xerces-c-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nuno Ferreira" <nuno.and.ferre...@gmail.com>
Subject Re: Question about XPath
Date Mon, 07 Apr 2008 10:37:19 GMT
Problem solved.
Thanks a lot!


On Mon, Apr 7, 2008 at 8:19 AM, Alberto Massari <amassari@datadirect.com>
wrote:

> Nuno Ferreira wrote:
>
> > Hi, i'm using Xerces 3.0.0.b1 and i can't get xpath to work
> >
> > Basically i'm parsing a file with XercesDOMParser
> >
> > then i grab the stuff to a DOMDocument
> >
> > DOMDocument* domDoc = xdomp->getDocument();
> >
> > initialise the xpath stuff
> >
> > DOMXPathEvaluator* xpath = (DOMXPathEvaluator*) domDoc;
> > DOMXPathResult *xpres;
> >
> > and finally in a try/catch i try to get the result
> >
> > xpres = (DOMXPathResult *)
> > xpath->evaluate(XMLString::transcode("packet/group/offset"),
> > domDoc->getDocumentElement(), NULL, DOMXPathResult::ANY_TYPE, NULL);
> >
> >
>
> The XPath processing can only return nodes, so the types that are
> supported are DOMXPathResult::FIRST_ORDERED_NODE_TYPE,
> DOMXPathResult::ORDERED_NODE_SNAPSHOT_TYPE,
> DOMXPathResult::ANY_UNORDERED_NODE_TYPE and
> DOMXPathResult::UNORDERED_NODE_SNAPSHOT_TYPE
>
> Alberto
>
>
>  However i always get a message saying: "The requested result type is not
> > supported".
> >
> > Any help?
> >
> > Thanks
> >
> >
> >
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message