wood burning stoves 2.0*
The moose likes XML and Related Technologies and the fly likes How can I include dynamic data inside XML? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How can I include dynamic data inside XML?" Watch "How can I include dynamic data inside XML?" New topic
Author

How can I include dynamic data inside XML?

Dave Trower
Ranch Hand

Joined: Feb 12, 2003
Posts: 86
I am trying to put dynamic data inside the xml. The problem I am having is that sometimes the data contains characters that look like XML tags.

For example:
<?xml version="1.0" encoding="UTF-8"?>
<error>
at java.net.Socket.<init>(Socket.java(Compiled Code))
</error>

This will not parse since <init> looks like an XML tag without an ending tag.
Is there an easy way to handle this?
Kantutan Tayo
Greenhorn

Joined: Oct 07, 2005
Posts: 22
wrap it around with CDATA
i.e.
<![CDATA[

at java.asdf.<init>

]]>


SCJP
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How can I include dynamic data inside XML?