Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

= & chacacters cause "XML Parsing Error: not well-formed"

Status
Not open for further replies.

jdbolt

Programmer
Aug 10, 2005
89
CA
I am using php to generate an xml document, howebver I get errors when there are certain characters in the XML document, such as '=' or '&'. I still need these characters to be in the document, so is there a way to avoid this error?

Below is a sample XML document

<?xml version="1.0" encoding="UTF-8"?>
<root type='approvedDocs'>
<child>
<class>PMP</class>
<numdocs>1</numdocs>
<classname>Project Management Plans</classname>
<classdescription>These plans are typically made up of smaller plans, including verification and validation plans, quality plans, testing plans, and schedules.</classdescription>
<url></child>
<child>

<class>PMP</class>
<numdocs>1</numdocs>
<classname>Project Management Plans</classname>
<classdescription>These plans are typically made up of smaller plans, including verification and validation plans, quality plans, testing plans, and schedules.</classdescription>
<url></child>
<child>
<class>PMP</class>
<numdocs>1</numdocs>

<classname>Project Management Plans</classname>
<classdescription>These plans are typically made up of smaller plans, including verification and validation plans, quality plans, testing plans, and schedules.</classdescription>
<url></child>
</root>
 
I don't think this has anything to do with equal signs. You still have ampersands in you <url>...</url> elements that need to be &amp;. Interestingly enough, you have &amp; entities in the same elements...

A small lesson about entities can be found here.

Tom Morrison
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top