XML parsing in Mozilla

admin

Administrator
Staff member
Hi, Im having some problems getting XML to display in Mozilla. For some reason I'll get it to display fine in IE but will not come through in mozilla. I'm also having problems linking the XML file remotely (on a different web server). Anyway, thanks for any help... Here's my XML document and below is my HTML.


<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE newsbox [
<!ELEMENT newsbox (news+)>
<!ELEMENT news (title,content,username,country,date)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT content (#PCDATA)>
<!ELEMENT username (#PCDATA)>
<!ELEMENT country (#PCDATA)>
<!ELEMENT date (#PCDATA)>
<!ATTLIST news id CDATA #REQUIRED>
]>
<newsbox>
<news id="12">
<title>sdfgsdfg</title>
<content>sdfgsdfgsd</content>
<username/>
<country/>
<date>2005-01-19 15:37:36</date>
</news>
<news id="14">
<title>asdfasdf</title>
<content>asdfasdfasdf</content>
<username/>
<country/>
<date>2005-01-19 15:40:04</date>
</news>
<news id="13">
<title>test</title>
<content>test</content>
<username/>
<country/>
<date>2005-01-19 15:39:28</date>
</news>
<news id="15">
<title>test</title>
<content>test</content>
<username/>
<country/>
<date>1106170888</date>
</news>
</newsbox>


HTML:
<xml id="newsData" src=http://www.webdeveloper.com/forum/archive/index.php/"testing.xml"></xml> <!-- calls for external XML file -->
<table border="0" datasrc="#newsData">

<tr>
<td><span datasrc="#newsData" datafld="TITLE">&nbsp;</span></td>
<td><span datasrc="#newsData" datafld="CONTENT">&nbsp;</span></td>
</tr>

</table>

*EDIT* I would also like to point out that when going to the w3c "try it yourself" XML section I cannot get them to work in firefox either, thx for any help, again.
 
Back
Top