[jdom-interest] help basic parsing
Jack
vomaringo at yahoo.com
Wed Feb 21 09:00:21 PST 2007
Laurent Bihanic <laurent.bihanic at atosorigin.com> wrote:
Using XPath, you should be able to do the following (not tested) :
Document doc = new SAXBuilder().build(...);
XPath xpath =
XPath.newInstance("//ns1:gbean[@name='RMIRegistry']/ns1:attribute[@name='port']");
xpath.addNamespace("ns1", "http://geronimo.apache.org/xml/ns/attributes-1.1");
Element port = (Element) xpath.selectSingleNode(doc);
port.setText("8080");
Laurent
thanks. works great.
regards,
---------------------------------
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.jdom.org/pipermail/jdom-interest/attachments/20070221/75253351/attachment.htm
More information about the jdom-interest
mailing list