in SerializeNodeSet sample
1. change the XalanSourcetreeParseLiaison by XercesparseLiaison and XalanSourceTreeDomSupport by XercesDOMSupport
2. remove the line theDOMSupport.setParserLiaison(&Liaison)
3. evaluate this expresion /foo:doc/foo:name[1]
the result is No nodes matched the location path /foo:doc/foo:name[1]
and now if you undo the changes, and evalute the same expresion with XalanSourceTreeParseLiason the result is ok...
Can someone help me?
Nacho Conde wrote:
Sorry, here a code sample : the code of evaluator:
XObjectPtr xobject(theEvaluator.evaluate( theXercesDomSupport, theDocument.getDocumentElement(), XalanDOMString(xpathExpresion).c_str(), theDocument.getDocumentElement()));
the xpath expresion /rdf:RDF/rdf:Description/prf:component
the sample of xml
<?xml version="1.0" encoding="UTF-8" standalone="no" ?><rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:prf="http://www.openmobilealliance.org/tech/profiles/UAPROF/ccppschema-20021212#"
xmlns:mms="http://www.wapforum.org/profiles/MMS/ccppschema-20010111#"
xmlns:tme="http://www.tsm.inet/ccppschematme-AAAAMMDD#">
<rdf:Description id="10000000">
<prf:component>
<rdf:Description id="BrowserUA">
<prf:BrowserName/>
<prf:BrowserVersion/>
</rdf:Description>
</prf:component></rdf:Description>
</rdf:RDF>
this expresion works ok, whit XalanSourcetreeParserliaison, but when i use XercesParserLiaison dont work..
the evalute method can�t see the namespaces, i think...
[EMAIL PROTECTED] wrote:
Hi, i have a problem with XercesparerLiaison
if i use it, for parse a xml document the xpath expresion than i
evaluate don�t work, the error is: "prefix must resolver to a
namespace" but if i use XalanSourceTreeParserLiaison with he same
document and the same xpath expresion the evaluation works fine..., i need use XercesParserLiaison for use the method mapToXercesDocument,
You need to provide a complete, _minimal_ code sample along with a sample input document and XPath expression for anyone to help you.
If you are constucting a Xerces DOM instance programmatically, you must make sure you are creating a namespace-aware DOM. If you are parsing to a Xerces DOM instance, you need to make sure the parser you're using is properly configured for namespace processing.
Dave
__________ NOD32 1.1041 (20050330) Information __________
This message was checked by NOD32 antivirus system. http://www.nod32.com
__________ NOD32 1.1041 (20050330) Information __________
This message was checked by NOD32 antivirus system. http://www.nod32.com
