A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
XML and Related Technologies
how to get element list from xml file?
Joined: Jun 22, 2010
Jun 20, 2011 04:23:41
This is XMLfile and DTD file for that xml file
<?xml version="1.0" encoding="UTF-8"?> <message> <operation type="Text" action="click" key="DocumentName"> firstdoc </operation> </message>
<!ELEMENT message ( operation ) >
<!ELEMENT operation ( #PCDATA ) >
<!ATTLIST operation action NMTOKEN #REQUIRED >
<!ATTLIST operation key NMTOKEN #REQUIRED >
<!ATTLIST operation type NMTOKEN #REQUIRED >
My question is
1)How can i get Operation element type value,action value and key value by
2)how can i retrive value ie "firstdocument " by using the key ie
thanks in advance.
Author and all-around good cowpoke
Joined: Mar 22, 2000
Jun 20, 2011 11:56:04
A google search for "Harold Processing XML with JAVA" will lead you to Harold's free online book which is loaded with code examples related to your problem.
If, after trying to run some actual code, you get stuck, post the code and your problem.
subject: how to get element list from xml file?
Characters after markup
DTD not well formed
XML and XSL
Recreate XML file
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015