可能であればPHPとsimplexmlを使用して、次のサンプルドキュメントを解析して、テキストタグ内に含まれる内容段落、コンテンツ、その他のタグがそこにあります。xmlオブジェクト内から他のタグを含むXMLの文字列値を取得する方法
<section>
<id root="71EB365C-A4F5-D758-0C51-B8DA375805CD" />
<code code="34066-1" codeSystem="2.16.840.1.113883.6.1" displayName="BOXED WARNING SECTION" />
<title mediaType="text/x-hl7-title+xml">USE IN PREGNANCY</title>
<text><paragraph><content styleCode="bold">When used in pregnancy during the second and third trimesters, ACE inhibitors can cause injury and even death to the developing fetus. </content>When pregnancy is detected, quinapril tablets USP should be discontinued as soon as possible. See <content styleCode="bold">WARNINGS</content>, <content styleCode="bold">Fetal/Neonatal Morbidity and Mortality</content>.<linkHtml href="#W_fetal" /></paragraph><content styleCode="bold" /><content styleCode="bold" /><content styleCode="bold" /></text>
<effectiveTime value="20070112" />
</section>
私はそれをそのままphp/simplexmlで参照すると何も返しません。
$message .= $xml->section->text;
これは、テキストタグの内容が大きく異なり、巨大なプロジェクトのための単純な例ですので、私はちょうど、特にこの一例を解決することはできません。
私は、出力がなりたい:私は私が一望できるよ簡単な解決策があると確信しているとして、
<paragraph><content styleCode="bold">When used in pregnancy during the second and third trimesters, ACE inhibitors can cause injury and even death to the developing fetus. </content>When pregnancy is detected, quinapril tablets USP should be discontinued as soon as possible. See <content styleCode="bold">WARNINGS</content>, <content styleCode="bold">Fetal/Neonatal Morbidity and Mortality</content>.<linkHtml href="#W_fetal" /></paragraph><content styleCode="bold" /><content styleCode="bold" /><content styleCode="bold" />
感謝します。
あなたが本当にあなたのコードが動作していないことを確認しましたか?コードが正しいように見えます。 HTMLソースコードもチェックインしてください。あなたのデータは既知のHTMLではないタグを持っているので、追加のCSSなしでWebページに表示されません。 –