wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "[CDATA question" Watch "[CDATA question" New topic
Author

[CDATA question

ben oliver
Ranch Hand

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

***
...
<filename><![CDATA[d:\mydir\myfile]]>
</filename>
...
...
*****

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.

Thanks.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

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.
 
jQuery in Action, 2nd edition
 
subject: [CDATA question
 
Similar Threads
attributes
Re: Attach is the detail on the servlet error "The system cannot find the path specified"
Reading XML file to populate text fields
Servlet Error : The system cannot find the path specified
Accessing a file in an installed application in WebSphere App Server 4.0 Advanced Ed