How can i use java with XML. If i want to parse the xml document with java code, then how it can be possible. Please let me know, if any1 knows about this. I'm aware of java and xml as well. regards, Raheel.
What you can do is really phenomenal. Just for example, you can send the data input by a user in a webpage as a response to an event ( as a click of a button) as a �node� to the �Solver� which is written in Java, which can then retrieve the data stored in the node using A sample code can run thus: public String getDatabaseValues(Node eqNode, Document doc) { //instantiate the variables String st = ""; String st2 = ""; String st3 = ""; NamedNodeMap nm = eqNode.getAttributes(); // if(nm.getNamedItem("Pfs")!=null){ st1 = nm.getNamedItem("NodeName").getNodeValue(); etc�etc..
Varun_Pant
Greenhorn
Joined: Jul 19, 2001
Posts: 4
posted
0
DOM is the API for Document Object Model. DOM provides a representation of XML document as a tree, with data stored in the nodes: Each node representing a portion of data drawn from the original document. Using a suitable XML parser , like Apache Xerces, one can create a DOM tree. Refer any good book on DOM and parsing XML data.
Originally posted by Varun_Pant: DOM is the API for Document Object Model. DOM provides a representation of XML document as a tree, with data stored in the nodes: Each node representing a portion of data drawn from the original document. Using a suitable XML parser , like Apache Xerces, one can create a DOM tree. Refer any good book on DOM and parsing XML data.
You can also look into JDOM (www.jdom.org) which provides a more Java-centric and lightweight for of XML document handling. It is much easier to use than DOM for Java development with XML.
Jeremy Crosbie<BR>Co-Author of <A HREF="http://www.amazon.com/exec/obidos/ASIN/186100401X/ref=ase_electricporkchop" TARGET=_blank rel="nofollow">Professional Java XML</A>
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.