File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Retreiving the CDATA section in XML with DOM Parser

 
sn omen
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 651
3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.It worked fine.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic