Hi Youssef

There is a helper method for making elements based on
a subset of XPath expressions. So you can do things
like...

Document document = DocumentHelper.createDocument();

Element foo = DocumentHelper.makeElement( document,
"/a/b/c" );
Element bar = DocumentHelper.makeElement( document,
"/a/b/d" );


Where new elements will be created if required on the
path. So after the above code is run there will be one
element in the document for a, b, c and d.

Hope that helps. It would be nice to extend this idea
to more XPaths than simple element paths, but its
kinda hard.

James




Hi,
 
I create a Document like this:   document =
DocumentHelper.createDocument();
After I've got a String representing a Xpath query and
i would like write this Xpath
in the empty document object.
Is it possible ?
 
Thanks. 


__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to