XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Michael NevinsSubject: Failure of CDATA converting properly
Author: Michael Nevins
Date: 01 Jun 2010 12:36 PM
I am having a problem with maintaining the CDATA in my output with every line of code that is blank. I maintain the element name and attribute, but lose the CDATA.

<Line Number="60"><![CDATA[]]></Line>

I get back the following:
<Line Number="60"/>

Please advise

Michael A. Nevins
Northrop Grumman
Electronic Systems

Postnext
Minollo I.Subject: Failure of CDATA converting properly
Author: Minollo I.
Date: 01 Jun 2010 12:46 PM
Nothing we can do there; an empty CDATA section implies you really have no text node there. And when you serialize the element back, no children text nodes are created either; which implies you don't get the CDATA section back.

Just to be clear, as already hinted in a different post, there is no difference in the XML infoset among:
<element/>
<element></element>
<element><![CDATA[]]></element>

Postnext
Michael NevinsSubject: Failure of CDATA converting properly
Author: Michael Nevins
Date: 01 Jun 2010 01:11 PM
Well the processor that I am feeding needs to see the CDATA for each unique line number that exists. Any suggestions?

Michael A. Nevins
Northrop Grumman
Electronic Systems

Posttop
Minollo I.Subject: Failure of CDATA converting properly
Author: Minollo I.
Date: 01 Jun 2010 01:34 PM
...other than forcing at least one character (maybe a whitespace) to become the content of the empty element, I wouldn't know what to suggest.

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.