This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes XML and Related Technologies and the fly likes #PCDATA 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 "#PCDATA" Watch "#PCDATA" New topic


Simon Xu
Ranch Hand

Joined: Aug 16, 2000
Posts: 235
What does #PCDATA mean? How to use it?
Ajith Kallambella

Joined: Mar 17, 2000
Posts: 5782
PCDATA means Parsed Character Data. It is used in DTDs to describe the type of the XML data. It simply means the specific element contains data that should be parsed by the parser and should not be ignored.
The CDATA on the otherhand tells the parser not to worry about the data. ie., telling it not to parse it.
Here is an example. Consider the XML file

For this XML, if you were to write the DTD, here's how it would look. Note the PCDATA usage -

Hope that helps!

Ajith Kallambella M.
Sun Certified Programmer for the Java2 Platform.

Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
wood burning stoves
subject: #PCDATA