While running the WalkTheDoc Subroutine on any XML file, I am getting several <text> nodes. Why is that?
var vHandle as Int
subroutine WalkTheDoc(vh as int)
var vNodeName as string
var vNodeValue as String
var vFlag as int
vFlag = 1
while(vFlag = 1)
{
vNodeName = @XMLNodeName(vh)
//vNodeValue = @XMLNodeValue (vh)
//WriteLN (vNodeName + " = " + vNodeValue)
WriteLn(vNodeName)
if(@XMLChild(vh) = 1)
{
WalkTheDoc(vh)
vFlag = @XMLParent(vh)
}
vFlag = @XMLNext(vh)
}
end subroutine
vHandle = @XMLParseFile ("output.xml")
If vHandle <> -1 then
{
WalktheDoc (vHandle)
}
XMLDeleteDoc (vHandle)
If I create XML file using @XMLNewDoc ( ) command, it is missing the first line -
<?xml version="1.0" encoding="ISO-8859-1"?>
How do I place that?
I have just started working with XML. The Schema requires to make XML file several gererations deep. How do I accomplish it using whatever available in Sesame2.1?
I have just tried to present a small part of schema to show that it goes several generations deep:
</xs:element>
<xs:element name="WrittenDate" minOccurs="1" maxOccurs="1" type="DateType" />
<xs:element name="LastFillDate" minOccurs="0" maxOccurs="1" type="DateType" />
<xs:element name="Diagnosis" minOccurs="0" maxOccurs="2">
<xs:complexType>
<xs:sequence>
<xs:element name="ClinicalInformationQualifier" minOccurs="1" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="PrescriberSupplied|PharmacyInferred" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Primary" minOccurs="1" maxOccurs="1" type="DiagnosisType" />
<xs:element name="Secondary" minOccurs="0" maxOccurs="1" type="DiagnosisType" />
</xs:sequence>
</xs:complexType>
</xs:element>
I am really trying to put everything together including the presentation given by Erika on XML. The task seems daunting!