I want to use XML parser in nvXML.cpp to parse query result from
CAIM.
I stored the result in file and I parse the result using
nvXmlNode::parseFile().
But I got error when I try to parse the result. I dont understand what
causes the problem since the XML is correct.
If you have any idea please let me know.
Thank you.
sylvi
Here is the XML:
1. NO ERROR
<?xml version="1.0"?>
<sparql
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xs="http://www.w3.org/2001/XMLSchema#"
xmlns="http://www.w3.org/2005/sparql-results#" >
<head>
<variable name="name"/>
</head>
<results ordered="false" distinct="false">
<result>
<binding name="name">
<literal>AXIS 213 - 00408C6B159B</literal>
</binding>
</result>
<result>
<binding name="name">
<literal>HP459ABB</literal>
</binding>
</result>
</results>
</sparql>
2. ERROR (when I add more result)
<?xml version="1.0"?>
<sparql
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xs="http://www.w3.org/2001/XMLSchema#"
xmlns="http://www.w3.org/2005/sparql-results#" >
<head>
<variable name="name"/>
</head>
<results ordered="false" distinct="false">
<result>
<binding name="name">
<literal>AXIS 213 - 00408C6B159B</literal>
</binding>
</result>
<result>
<binding name="name">
<literal>HP459ABB</literal>
</binding>
</result>
<result>
<binding name="name">
<literal>AXIS 213 - 00408C6B0F68</literal>
</binding>
</result>
<result>
<binding name="name">
<literal>AXIS 210 - 00408C6F9DDA</literal>
</binding>
</result>
</results>
</sparql>
PS. XXXX is text. (not in XML format)
In our XML configuration for NAVER, we always put value as a XML
attribut. <child name="value">
Therefore, we need to modify the parser to parse the result from CAIM
or ask ubicomp team to change the CAIM query result format.
Thank you,
sylvi