By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,255 Members | 2,575 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,255 IT Pros & Developers. It's quick & easy.

XML and XPath

P: n/a
x
Couple of quick questions regarding Java and XML

Is it possible to parse XML from a string instead of from a file?

Using javascript I could explicitly call a node using
xmlNode.selectSingleNode("/node1/node[@attribute='whatever']");
Are there such functions available with Jave?

Cheers

Xav
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"x@a.c" <e@23.cooo> wrote in message news:<40**********************@news.optusnet.com.a u>...
Couple of quick questions regarding Java and XML

Is it possible to parse XML from a string instead of from a file?
I believe InputStream is one of the accepted data sources. Check out the
java.io Javadocs for options on how to wire strings up as input streams.

Using javascript I could explicitly call a node using
xmlNode.selectSingleNode("/node1/node[@attribute='whatever']");
Are there such functions available with Jave?


Jaxen appears to be a popular XPath engine for Java (http://jaxen.org/),
but I've not used it, so cannot comment on its quality or suitability.
-FISH- ><>
Jul 17 '05 #2

P: n/a
x

"FISH" <jo*****@merseymail.com> wrote in message

Jaxen appears to be a popular XPath engine for Java (http://jaxen.org/),
but I've not used it, so cannot comment on its quality or suitability.


Thanks for that, good stuff.

Jaxen seems really good but I have only used it with simple stuff so far.
I was surprised that these transformations aren't covered in the javax.xml
or org.xml libraries though.

Cheers

Xav
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.