LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LibXML with Labview - without namespace prefix

I have been using Labview's native XML parser to read an XML document. As it turns out, it is too slow for large files. I therefore am trying to use LibXML as it seems to be quite popular. However, I am having trouble with namespaces. I have a third-party XML document that comes like this:

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<foo xmlns="urn:foo_Schema_V3">
     <bar>
        <fooID description="XML Test 170731"></fooID>
        <barNumber>60</barNumber>      
    </bar>
</foo>

and would like to select the barNumber using Labview which uses XPath. Labview Code

The content text should be 60, however it remains empty. I read up a little and assume this is due to namespace issues in LibXML. As a test, I changed the second line in XML to

<foo xmlns:cliff="urn:foo_Schema_V3">

suddenly, the XPath expression works even though cliff is never even mentioned in Labview.

Q: How can I select the node I want without having a namespace prefix?

 

0 Kudos
Message 1 of 1
(2,143 Views)