次の XML ドキュメント情報があります。
<Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hl7-org:v3 CDA_SDTC.xsd" xmlns="urn:hl7-org:v3" xmlns:cda="urn:hl7-org:v3" xmlns:sdtc="urn:hl7-org:sdtc">
<component>
<structuredBody>
<component>
<section>
<templateId root="2.16.840.1.113883.10.20.22.2.45" />
<title>Instructions</title>
<text>
<paragraph>Putting instructions into the node to read out into the text area.</paragraph>
</text>
</section>
</component>
</structuredBody>
</component>
</Document>
この特定の情報を検索し、段落ノードのコンテンツを Web ページのテキスト領域フォーム フィールドに配置するには、XML ドキュメントを VB.NET ページでロードする必要があります。これは問題なく動作していましたが、ドキュメント ルートにいくつかの名前空間情報が追加されたため、動作しなくなりました。これは VB.NET コードです。
m_nodelist = m_xmld.SelectNodes("Document/component/structuredBody/component/section")
For Each m_node In m_nodelist
If m_node("title").InnerText = "Instructions" Then
Dim Instructions As String = m_xmld.SelectSingleNode("Document/component/structuredBody/component/section[title='Instructions']/text/paragraph").InnerText
txtInstructions.Text = Replace(patientInstructions, "<br>", Chr(10) & Chr(13))
hfInstructionsOld.Value = Replace(patientInstructions, "<br>", Chr(10) & Chr(13))
End If
Next
ルートノードには名前空間が定義されていなかったため、以前は機能していたと思います。今ではそうです。それを考慮して VB.NET コードを変更する方法がわかりません。