File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes Retreiving the CDATA section in XML with DOM Parser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Retreiving the CDATA section in XML with DOM Parser" Watch "Retreiving the CDATA section in XML with DOM Parser" New topic
Author

Retreiving the CDATA section in XML with DOM Parser

sn omen
Greenhorn

Joined: May 23, 2013
Posts: 6
Sample XML



Main.java



Parser.java



With the above code I'm able to extract 'title', 'link' and 'pubDate'.
How can I extract 'href' value and the Text (IMF chief Christine Lagarde arrives at a Paris......) within the 'description' tag?
g tsuji
Ranch Hand

Joined: Jan 18, 2011
Posts: 509
    
    3
How can I extract 'href' value and the Text (IMF chief Christine Lagarde arrives at a Paris......) within the 'description' tag?

This is one way how you can do.
sn omen
Greenhorn

Joined: May 23, 2013
Posts: 6
Thanks.It worked fine.
 
Consider Paul's rocket mass heater.
 
subject: Retreiving the CDATA section in XML with DOM Parser