• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Doubt in org.w3c.dom.Document.

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
Is there any method supported in java to know if the XML Document contains CData section ?

regards,
Arjun.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If an org.w3c.dom.Document contains CDATA sections, then there will be nodes in the tree of the type org.w3c.dom.CDATASection. Note also that Node has a method getNodeType(), which will return Node.CDATA_SECTION_NODE if the node is a CDATA section.

So you could walk through the tree of nodes, calling getNodeType() on each node and see if it is equal to Node.CDATA_SECTION_NODE.

Have a look at the API documentation of the interfaces and classes in package org.w3c.dom.
[ October 30, 2007: Message edited by: Jesper Young ]
 
Arjun Karthick
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks.
 
I've read about this kind of thing at the checkout counter. That's where I met this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic