This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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


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: 8
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: 591
    
    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: 8
Thanks.It worked fine.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Retreiving the CDATA section in XML with DOM Parser
 
jQuery in Action, 3rd edition