I have the following XML in a string. The xmlns link is "Not Found". I was trying to use the example in Help to traverse through the xml but I get "source" node in the first loop then it drops out. It's very strange behavior that I'm just not sure of. Does anyone have any suggestions on how to read this xml?
Code:
<?xml version="1.0" encoding="Windows-1252" standalone="yes"?>
<barcodes xmlns='http://zbar.sourceforge.net/2008/barcode'>
<source href='V:\VLPTest17\17.4\Imaging\inbox\BarcodesTest.pdf'>
<index num='0'>
<symbol type='CODE-128' quality='19'>
<data><![CDATA[145973]]></data>
</symbol>
</index>
</source>
</barcodes>
Here's the code I have where I'm trying to traverse:
Code:
Get Create (RefClass(cXmlDomDocument)) to hoXML
Set pbValidateOnParse of hoXML to True
Get LoadXML of hoXML sXML to bOK
If not bOK Begin
Send BasicParseErrorReport of hoXml
Send Destroy of hoXML
Function_Return ""
End
Get DocumentElement of hoXML to hoRoot
If (hoRoot = 0) Begin
Send Destroy to hoXML
Function_Return ""
End
// traverse through nodes. Start with first child and then
// move through each sibling
Move 0 to iLineCount
Get FirstChild of hoRoot to hoNode // get the first node
While (hoNode<>0)
Increment iLineCount
Send ShowInformation hoNode iLineCount
Get NextNode of hoNode to hoNode // now get next sibling node, destroy current node
Loop
Thank you for any help.