Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > escaping "&" in xml

escaping "&" in xml
Thread Tools
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Mar 29, 2005, 12:37 AM
 
//Edit: figured it out, as I'm using a php form to generate the xml I can use an ereg replace to generate the "& + amp;" needed.
// Monday morning idiocy

An "&" placed in text of an xml document is breaking the xml.

Where should I be looking for info on xml syntax? It's been a tricky one to google.

TIA

(importing xml into Flash)
(Last edited by skalie; Mar 29, 2005 at 03:04 AM. )
     
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Mar 29, 2005, 04:27 AM
 
Originally posted by skalie:
//Edit: figured it out, as I'm using a php form to generate the xml I can use an ereg replace to generate the "& + amp;" needed.
// Monday morning idiocy

An "&" placed in text of an xml document is breaking the xml.

Where should I be looking for info on xml syntax? It's been a tricky one to google.

TIA

(importing xml into Flash)
You can also escape entities by enclosing them in a CDATA declaration:-

Code:
<yourElement><![CDATA[Nuts & Bolts]]></yourElement>
Computer thez nohhh...
     
skalie  (op)
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Mar 29, 2005, 05:12 AM
 
Thanks Simon, that was what I was looking for, and may well be in the future.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:23 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2