cdata

Is this XML file correct for RSS feeding?

Hi guys I am generating a XML-RSS type file from PHP. The output for example is like this <?xml version="1.0" encoding="iso-8859-1"?> <rss version="2.0"> <channel> <title>Mi web mola</title> <link>http://www.dominio.com/blog.php&lt;/link&gt; <language>es-ES</language> <description>Mallas y eso</description> <gener...

Is starting to use CDATA a breaking change?

For interaction with a customer's application we use XML documents. That is, we send an XML over HTTP and receive a response XML document the same way. The customer specified two XML schemata that describe the format of both the request and reply. All was working fine, until one day the customer started to use CDATA sections in the respo...

How to get CDATA of from xml node using xsl ?

Hi All, I am trying to fetch CDATA section of XML node using XSL. Node looks like; <node id=1 text="Book Information" ><![CDATA[This is sample text]></node> Does anyone have any idea about this? Thanks in advance. ...

PHP: How to get rid of all <![CDATA[ and ]]> occurrences in a string?

I tried this as a test: <?php $crap = "<![CDATA[Hello, world!]]>"; $crap = str_replace(list("<![CDATA[", "]]>"), "", $crap); echo $crap; ?> But it returned this: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ')' in /srv/www/htdocs/test.php on line 3 ...

PHP: How to handle <![CDATA[ with SimpleXMLElement?

I noticed that when using SimpleXMLElement on a document that contains those CDATA tags, the content is always NULL. How do I fix this? Also, sorry for spamming about XML here. I have been trying to get an XML based script to work for several hours now... <content><![CDATA[Hello, world!]]></content> I tried the first hit on Google if...

Stop CDATA tags from being output-escaped when writing to XML in C#

We're creating a system outputting some data to an XML schema. Some of the fields in this schema need their formatting preserved, as it will be parsed by the end system into potentially a Word doc layout. To do this we're using <![CDATA[Some formatted text]]> tags inside of the App.Config file, then putting that into an appropriate prope...

How do I get a less than in a javascript for loop in XSL to work?

I am using CDATA to escape the script but in IE8's debugger I still get this message: "Expected ')'" in the for loop conditions. I am assuming it still thinks that the ; in the &lt; generated by CDATA is ending the loop conditions. Original script in my XSL template: <script type="text/javascript" language="javascript"> <![CDATA[ ...

XML cdata tgas being erased when there's input in Russian

Hello, I have a very strange problem which I will be very thankful if someone would help me with. I have a form that has a textarea whose content is later transferred to a page that has a line like this (using DOM with php to change data on an XML file): $dom->getElementsByTagName("page")->item($itemNum)->getElementsByTagName("lang...

CDATA xml parsing extra greater than problem

Hi, I am creating an xml using php and parsing that xml in iphone application code. In description field there is some html tags and text. I am using following line to convert this html tags in to xml tag using CDATA. $response .= '<desc><![CDATA['.trim($feed['fulltext']).']]></desc>'; Now, here my $feed['fulltext'] value is like t...

Regex to strip tags, retain CDATA

Possible Duplicate: RegEx match open tags except XHTML self-contained tags Hi all, I know how everyone loves a regex question, so here is mine. I have an XML tree within which some nodes contain CDATA. How do I return just a string containing the data? Lets see an example <xml> <node>I'm plain text.</node> <node><![CDAT...

PHP XML editing CDATA node

Hi, I have an XML file with some CDATA nodes. I want to change the text inside the CDATA node (keeping it as CDATA node). So, I guess I first need to read the CDATA node and then write it back. But, I am not sure how to do that in PHP. I was able to create a new CDATA node but how can I edit a CDATA node? Is there a direct way to do tha...

How to generate CDATA block using JAXB ?

I am using JAXB to serialize my data to XML. The class code is simple as given below. I want to produce XML that contains CDATA blocks for the value of some Args. For example, current code produces this XML: <command> <args> <arg name="test_id">1234</arg> <arg name="source">&lt;html>EMAIL&lt;/html></arg> </args> </comm...

How do you add a CDATA section to an XMLDocument object in Actionscript 3?

I remember doing it before, so I guess I'm missing something here. XMLNode's nodeType property only support ELEMENT_NODE and TEXT_NODE, and if I try to add the CDATA section to the XMLNode as a string it get escaped. var node:XMLNode = new XMLNode(3, "<![CDATA[some text and <tags> here]]>"); What I get is a TEXT_NODE with the followin...

CDATA not working in RSS Title

cdata is not working in title. it is working in description ! <item> <title>Line and <![CDATA[<br />]]>breaked line</title> <pubDate>09 Jun 2010</pubDate> <description>Line and <![CDATA[<br />]]>breaked line</description> <category>cat</category> </item> ...

Should I use <![CDATA[ in HTML5?

I'm pretty sure the <![CDATA[ tags need to be used in XHTML5, but what about HTML5? Or correct me if I don't need to use them in either? ...

iPhone remove <![CDATA

Hi, I am reading a xml and finaly just need to remove the CDATA Infos in my results For example: I get: "<![CDATA[iPhone 4-Rückgaberecht: Deutsche Telekom kulant]]>" just need "iPhone 4-Rückgaberecht: Deutsche Telekom kulant" thx chris Edit to your answers: I am not using NSXMLParser (thats the reason I make my own parser) Found ...

CDATA XML is truncated while parsing

Hi, I'm using a SAX parser (on android) to parse an xml file from an WebService. On some elements the CDATA is truncated and not complete, e.g. the XML-file contains data like <name><![CDATA[Gölsder und Ginck GmbH]]></name> and after parsing the xml file with public void characters(char[] ch, int start, int length) throws SAX...

Wordpress - Disqus error with custom page template

Hi, I created a custom page template to display a filterable portfolio in Wordpress. However, on that custom page I am getting an error code - // <![CDATA[ (function() { document.write('<script charset="utf-8" type="text/javascript" src="http://thinquetanque.disqus.com/get_num_replies_from_wpid.js?v=2.2&amp;amp;t=span&amp;amp;wpid0=14&...

linq to xml CDATA problem

When I used linq to retrieve xml, <CDATA[[ ]]> is removed, which is what I want to achieve. But when I save the file, <CDATA[[ ]]> becomes &lt;CDATA[[ ]]&gt; in the xml file. Whether or not I explicitly append with <CDATA[[ ]]> before saving gives me the same result. Tried appending with &lt;CDATA[[ ]]&gt; but still gives me th...

SQL Server XmlType not preserving the CDATA element...

We are using SQL Server 2005 and are trying to store an XML Type in the database. The XML type has an element that needs to contain the content in CDATA, yet once inserted, the field seems to be stripping the CDATA and storing the element without it... Has anybody experienced or even resolved this in the past? Handy example: create t...