473,382 Members | 1,386 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

XML cdata error

Hi guys,

I'm having trouble with the following code:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE db
[
<!ELEMENT db (title)>
<!ELEMENT title (#PCDATA)>
]>

<db>
<title>"%%&&&hello!!!"</title>
</db>

It doesn't work at all...any suggests would be appreciateds, thanks
Jul 20 '05 #1
2 1475
Larry wrote:
<db>
<title>"%%&&&hello!!!"</title>
</db>

It doesn't work at all...any suggests would be appreciateds, thanks


You must escape your ampersands, as they have a special meaning -- they
are used for -- escaping ! Use &amp; instead.

Soren
Jul 20 '05 #2


Larry wrote:

I'm having trouble with the following code:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE db
[
<!ELEMENT db (title)>
<!ELEMENT title (#PCDATA)>
]>

<db>
<title>"%%&&&hello!!!"</title>
</db>

It doesn't work at all...any suggests would be appreciateds


Use what your subjects says, a CDATA section
<title><![CDATA["%%&&&hello!!!"]]></title>
Or escape every ampersand as &amp;.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Forest | last post by:
Hi, I am using JDOM beta 9. I got VerifyError when starting Websphere server using the following code. The following was inside an EJB, there is no error when I use data.setText(). Element...
4
by: sunil | last post by:
I am creating a XML document which opens fine in IE. Implies MSXML thinks it is a well formed document. But when I try to load this document in VB.net using the following code Dim doc As New...
4
by: Rich Wallace | last post by:
Hi all, I have an XML document fed to me from a third party app: <?xml version="1.0" encoding="WINDOWS-1252" ?> <GatewayPlan xmlns:xsd="http://www.w3.org/2001/XMLSchema"...
2
by: Damon | last post by:
I'm getting errors using XML deserialisation and CDATA sections when there are hexidecimal characters involved. If the CDATA section does not contain a hexidecimal values everything is fine....
4
by: Jake Barnes | last post by:
I'm reading over this page: http://wiki.script.aculo.us/scriptaculous/show/Usage I'm struck by this code example +++++++++++++++++++++++++++++++ 3. Use
7
by: Max | last post by:
Hello everyone! Can anyone help me to convert the CDATA expression "CDATA ::= (Char* - (Char* ']]>' Char*)" to Javascript Regular Expression? Thanks, Max
18
by: sim.sim | last post by:
Hi all. i'm faced to trouble using minidom: #i have a string (xml) within CDATA section, and the section includes "\r\n": iInStr = '<?xml version="1.0"?>\n<Data><!]></Data>\n' #After i...
8
by: Twayne | last post by:
Hi, Probably another question I could answer myself if I only found the right search term, but ... I have in some code I'm studying/trying to learn: ------------------------ <style...
6
by: dkyadav80 | last post by:
Hi sir, I'm new about xml, javascript. I have two selection field(html) first is city and second is state. the city and state values should be store in xml file. when user select city then all...
1
!NoItAll
by: !NoItAll | last post by:
The MSXML parser is choking on a single character that often appears in my data within a CDATA section. Try this: Dim bRet As Boolean Dim lRet as long Dim xmlDoc As MSXML2.DOMDocument Set...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.