Jump to content

PHP returns invalid XML because of '&'


mesh2005

Recommended Posts

Also I'd advise against storing data values as attributes

 

<record>
   <id>2</id>
   <text>jjjj&kkkk</text>
   <other>any</other>
</record>

 

Use attributes for metadata (describing the data) eg

 

<record>
   <id>2</id>
   <text>jjjj&kkkk</text>
   <other>any</other>
   <phone loc="home">888-777-6666</phone>
   <phone loc="office">888-666-5555</phone>
</record>

 

my $0.02

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.