Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within XML
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
XML and Related Technologies
xml and jsp
Sunesh Kumar
Ranch Hand
Posts: 89
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi Friends,
I am developing an application in which i have to read an xml, which is created by the data in all the tables in the database.
Now i have to read that xml and have to insert into databse when ever required.
My problem is that
NodeList orders = ordersRoot.getElementsByTagName("order");
NodeList products = ordersRoot.getElementsByTagName("product");
....so on
where order and product are tables..how can i give like this directly as the tables may vary..then how can i read and insert
can any one please suggest me...
Thanks & Regards<br />Sunesh Kumar Baachu
Bear Bibeault
Sheriff
Posts: 67746
173
I like...
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
There appears to be no real
JSP
component to this question so I have moved it to the XML forum.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Paul Clapham
Marshal
Posts: 28193
95
I like...
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
So you don't know what element name you will be looking for? Then you would just have to read the elements and find out what their names are. I will give you a link to a DOM tutorial:
http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/dom/index.html
And if you google for "java dom tutorial" or "java xml tutorial" you will find more similar tutorials.
Sunesh Kumar
Ranch Hand
Posts: 89
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi Paul,
Can you please guide me with an example...
Bye
Thanks & Regards<br />Sunesh Kumar Baachu
Ulf Dittmer
Rancher
Posts: 43081
77
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
There are examples of how to read an XML file with either DOM or SAX
here
.
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Hibernate: How to disable insert?
below code is correct way to write the code in generic way if we receive different xml formats
xml reading
Urgent ORDBMS with JDBC
table access
More...