File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Java EE 7 Tutorial Volume 1 or Volume 2
this week in the
jQuery UI in Action
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.
rocket mass heater
subject: how to get element list from xml file?
Characters after markup
Recreate XML file
XML and XSL
DTD not well formed
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014