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
Elasticsearch in Action
this week in the
XML and Related Technologies
Joined: Nov 28, 2008
Nov 28, 2008 23:49:00
one of our client requirement is, to read XML file dynamically and insert into tables, without using tag name (that is getElementByTagName() method) how i will get the tag name and its value in
Author and all-around good cowpoke
Joined: Mar 22, 2000
Nov 29, 2008 07:01:00
without using tag name (that is getElementByTagName() method)
Do you mean that you don't know the tag name or what?
Are you reading the XML document into a DOM? If so you could probably use XPath statements to extract the text. See the standard Java library javax.xml.xpath package (since Java 1.5).
(This really sounds like a homework assignment to me now that I think about it.)
I agree. Here's the link:
subject: xml reading
How to Escape '.' character in tag while parsing
JSP and XML
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015