I am new to xml. I wish to generate XML data from a SQL database to be returned to a Flash program. Although i have sample output as a guide, when i create the xml manually, it is not recognized as xml although it looks exactly like the sample output that does work correctly. I think it is also possible to have the database return xml so i do not have to hand encode it but i do not know how to do that either.
Below are two samples, one i manually created and one that is returned by an application. The first one is not recognized as xml, the second one is.
This is a sample of the output i created manually from a database:
<?xml version="1.0" encoding="iso-8859-1" ?>
<guestbook entries="1">
<entry>
<id>3</id>
<name>JASON KID</name>
<city>PHOENIX</city>
<state>AZ</state>
<comment></comment>
<datetime>3/18/2005 12:27:34 AM</datetime>
</entry>
</guestbook>
<?xml version="1.0" encoding="iso-8859-1" ?>
This is sample output i have that does work:
<guestbook entries="50">
<entry>
<id>12990</id>
<name>gy8hu8</name>
<emailaddress><![CDATA[]]></emailaddress>
<url><![CDATA[ijp]]></url>
<comments><![CDATA[ijp]]></comments>
<ipaddress>200.83.115.193</ipaddress>
<datetime>May 3, 2005, 12:17 AM UTC</datetime>
</entry>
Can anyone point me in the right direction?
Below are two samples, one i manually created and one that is returned by an application. The first one is not recognized as xml, the second one is.
This is a sample of the output i created manually from a database:
<?xml version="1.0" encoding="iso-8859-1" ?>
<guestbook entries="1">
<entry>
<id>3</id>
<name>JASON KID</name>
<city>PHOENIX</city>
<state>AZ</state>
<comment></comment>
<datetime>3/18/2005 12:27:34 AM</datetime>
</entry>
</guestbook>
<?xml version="1.0" encoding="iso-8859-1" ?>
This is sample output i have that does work:
<guestbook entries="50">
<entry>
<id>12990</id>
<name>gy8hu8</name>
<emailaddress><![CDATA[]]></emailaddress>
<url><![CDATA[ijp]]></url>
<comments><![CDATA[ijp]]></comments>
<ipaddress>200.83.115.193</ipaddress>
<datetime>May 3, 2005, 12:17 AM UTC</datetime>
</entry>
Can anyone point me in the right direction?