Hello Gurus,
How to get sub XML structure snippet from a big XML file
Ex:
<Info>
<person>
<address>
<street>
<name>
<type>
</street>
</address>
</person>
<CCard>
<cardno>23232323232323</cardno>
< expire>9/09</expire>
</CCard>
<>
.
.
.
.
.
.
</>
<>
.
.
</>
</Info>
I want to get the XML snippet of address only, I don’t want to use String tokenizer, Is there any way to get it?
I will really appreciate your help.
Thanks
Buchanna Gajula
-
How to get sub XML structure snippet from a big XML (1 messages)
- Posted by: Buchanna Gajula
- Posted on: October 05 2005 23:36 EDT
Threaded Messages (1)
- How to get sub XML structure snippet from a big XML by Sowmya Sridhar on October 10 2005 13:42 EDT
-
How to get sub XML structure snippet from a big XML[ Go to top ]
- Posted by: Sowmya Sridhar
- Posted on: October 10 2005 13:42 EDT
- in response to Buchanna Gajula
You can use XQuery to get this. There are various XQuery libs available and if u are using weblogic workshop, it is very easy. You can diagramatically design ur query. If u dont want to use that, u can compile the schema for this XML into apache xml beans and use the getAddress() on the appropriate bean to get the address. Never use StringTokenizer because it can cause all other headaches like decoding the < and other escape chars.
Hope it helps