Need help in parsing a big XML file with JAVA

java , xml , parsing India
  • 12 years ago
    Hi, I have a really big XML to handle (around 5000 lines). Basically I need to read it and pass the data to UI. It has a lot of tags and most of them have attributes. The problem is I need to pass tag names, attribute names etc... to get the data. If it were a small XML, i could have done it by passing the tag names and attributes names. Now, I want to know if i can just do something like get the root tag , get its name, check if it has children, if yes then get the tag names and text. Check if the tags have attributes. If yes, get their name and values, and so on. I can then put the tag names, tag values , attribute names, attribute values and the text values in a collection class along with the tags heirarchy wrt the root tag(0 for root, 1 for root's children, 2 for its grandchildren...) and pass it to the UI. Is there a way to do this? Thanks in advance Praveen

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“It works on my machine.” - Anonymous