Hi all,
this is the first time I post on the mailing list so please apologies if some
informations are missing: just ask for them and I'll give you them with
pleasure :)
I wrote this simple sample of code that should work fine:
import org.restlet.ext.xml.DomRepresentation;
DomRepresentation domRep = new DomRepresentation(MediaType.APPLICATION_XML,
doc.getDom());
refNode = domRep.getNode(refnode);
Here, doc.getDom() is a valid XML Document (org.w3c.dom.Document) : I print the
content of the document as a String (in the console) and the content is ok.
I also use the org.restlet.data.MediaType.
I try to search for the following xpath :
"/section/section/section/para/text()" but it fails : the method getNode()
returns null.
I checked the content of the XML and the path exists.
I tried with simpler xpath, like "/section" but it returns null too.
When I print the result of getNode("/*"), it shows "[section: null]".
When I print the result of getNode("/"), it shows "[#document: null]".
Does any one know what is the reason of this problem ? or what could I do to
solve it ?
Do you need more informations ?
Thanks in advance for helping.
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2694559