PDA

View Full Version : XML data does not display in OPERA, Netscape


newatthis
01-20-2005, 03:31 AM
Please help;

Just learning XML. Thought I could edit an XML file easier than my HTML page for each update.
The problem is that my data does not display when using the browser OPERA or NETSCAPE.
Here is my XML file.
Just added the ELEMENTs. Thought that would work.

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE hghouse [
<!ELEMENT hghouse (location,price,info)>
<!ELEMENT location (#PCDATA)>
<!ELEMENT price (#PCDATA)>
<!ELEMENT info (#PCDATA)>
]>

<hghouse>
<location>Anywhere USA</location>
<price>$699,900</price>
<info>Stunning New Construction Victorian! Beautiful 4BR, 3Bth Victorian w/2 car garage, full BSMT. LR w/fireplace. Located in private beach community. Steps from beach!</info>
</hghouse>

Alex Vincent
01-20-2005, 04:29 AM
Looks good to me. XML doesn't come with any default styling, so you often have to use an external stylesheet.

<?xml-stylesheet type="text/css" href="foo.css"?>

Try adding a line like that, and creating a foo.css, before the <!DOCTYPE > tag.

mpjbrennan
01-20-2005, 12:19 PM
Beware - Opera only implements css stylesheets for xml files. If you call an xsl stylesheet all you get is raw text. Also - have you used the correct coding for the $ symbol - I believe its $

patrick