Results 1 to 4 of 4
Thread: Parsing XML With DOM
- 08-22-2012, 01:09 PM #1
Member
- Join Date
- Aug 2012
- Posts
- 10
- Rep Power
- 0
Parsing XML With DOM
Hi,
Can anyone provide me a link where I can find any example to parse the XML using DOM. I have an XML with deeply nested elements and I need to parse and write the data to a text file. I have gone through some of the tutorials and I am able to parse the XML. But, I am a bit confused with the nested nodes and elements. Could anyone help me pls.
Please find the sample XML structure here:
Java Code:<?xml version="1.0" encoding="UTF-8"?> <ns0:abc xmlns:ns0="http://www.google.com"> <B4K> <B4K01>00</B4K01> <B4K02>AC</B4K02> <R4F> <R4F01>CR</R4F01> </R4F> <R4F> <R4F01>CR</R4F01> </R4F> <N41> <N4101>ST</N4101> <N4102>abcd</N4102> <N43> <N4301>RAJ</N4301> </N43> <N43> <N4301>szfsd</N4301> </N43> <N44> <N4401>US</N4401> <N4402>sdg</N4402> <N4403>500021</N4403> </N44> </N41> <P41> <P4102/> <P4103>SE</P4103> <P4104/> <PID> <PID01>01</PID01> <PID02>02</PID02> </PID> <PID> <PID01>01</PID01> <PID02>02</PID02> </PID> <S4C> <S4C01>A</S4C01> </S4C> <A4K> <A4K01>FCE</A4K01> <A4K04>087</A4K04> <A4K05/> </A4K> </P41> </B4K> </ns0:abc>Last edited by SindhuP; 08-22-2012 at 05:05 PM.
- 08-22-2012, 03:40 PM #2
Re: Parsing XML With DOM
Moved from New to Java
Forum Rules
Guide For New Members
BB Code List - Java Programming Forum
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 08-22-2012, 05:09 PM #3
Member
- Join Date
- Aug 2012
- Posts
- 10
- Rep Power
- 0
Parsing XML using DOM in Java
Hi,
Can anyone provide me a link where I can find any example to parse the XML using DOM. I have an XML with deeply nested elements and I need to parse and write the data to a text file. I have gone through some of the tutorials and I am able to parse the XML. But, I am a bit confused with the nested nodes and elements. Could anyone help me pls.
Please find the sample XML structure here:
Java Code:<?xml version="1.0" encoding="UTF-8"?> <ns0:abc xmlns:ns0="http://www.google.com"> <B4K> <B4K01>00</B4K01> <B4K02>AC</B4K02> <R4F> <R4F01>CR</R4F01> </R4F> <R4F> <R4F01>CR</R4F01> </R4F> <N41> <N4101>ST</N4101> <N4102>abcd</N4102> <N43> <N4301>RAJ</N4301> </N43> <N43> <N4301>szfsd</N4301> </N43> <N44> <N4401>US</N4401> <N4402>sdg</N4402> <N4403>500021</N4403> </N44> </N41> <P41> <P4102/> <P4103>SE</P4103> <P4104/> <PID> <PID01>01</PID01> <PID02>02</PID02> </PID> <PID> <PID01>01</PID01> <PID02>02</PID02> </PID> <S4C> <S4C01>A</S4C01> </S4C> <A4K> <A4K01>FCE</A4K01> <A4K04>087</A4K04> <A4K05/> </A4K> </P41> </B4K> </ns0:abc>
- 08-22-2012, 06:01 PM #4
Similar Threads
-
Parsing XML
By Opid in forum New To JavaReplies: 0Last Post: 10-03-2011, 01:39 AM -
Parsing XML
By virvalid in forum Advanced JavaReplies: 3Last Post: 08-10-2009, 12:40 PM -
Parsing
By Matt Sakko in forum New To JavaReplies: 14Last Post: 03-21-2009, 04:49 PM -
Xml Parsing
By Nomad in forum XMLReplies: 12Last Post: 02-22-2009, 11:19 AM -
xml parsing
By gaurav65176 in forum XMLReplies: 5Last Post: 11-12-2008, 11:07 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks