This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes [CDATA question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "[CDATA question" Watch "[CDATA question" New topic

[CDATA question

ben oliver
Ranch Hand

Joined: Mar 28, 2006
Posts: 375
I have a xml segment like


what I meant is to specify "d:\mydir\myfile" as the "filename" in the XML file. Is this the right way to do it ? please point out any syntax error.

Paul Clapham

Joined: Oct 14, 2005
Posts: 19869

If you're asking whether that's the correct syntax for a CDATA section, then it looks to me like it is, but you would get a more reliable (and probably faster) by running it through an XML parser.
I agree. Here's the link:
subject: [CDATA question
It's not a secret anymore!