Find the answer to your Linux question:
Results 1 to 5 of 5
I have the following Xml code Code: <?xml version="1.0" encoding="UTF-8"?> <CATALOG> <CD> <TITLE>Empire Burlesque</TITLE> <ARTIST>Bob Dylan</ARTIST> <COUNTRY>USA</COUNTRY> <COMPANY>Columbia</COMPANY> <PRICE>10.90</PRICE> <YEAR>1985</YEAR> </CD> </CATALOG> I cant seem to read this data from ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2004
    Location
    Bangalore,India
    Posts
    6

    Cant read XML data on my browser


    I have the following Xml code

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <CATALOG>
    
    	<CD>
    		<TITLE>Empire Burlesque</TITLE>
    		<ARTIST>Bob Dylan</ARTIST>
    		<COUNTRY>USA</COUNTRY>
    		<COMPANY>Columbia</COMPANY>
    		<PRICE>10.90</PRICE>
    		<YEAR>1985</YEAR>
    	</CD>
    
    </CATALOG>
    I cant seem to read this data from my browser. Which has the following code

    Code:
    <html>
    
    <body>
    <xml
    src="/root/XML/cd_catalog1.xml"
    id="xmldso"
    async="false">
    </xml>
    
    <table
    datasrc="#xmldso"
    width="100%"
    border="1">
    
    <thead>
    <th>Title</th>
    <th>Artist</th>
    <th>Year</th>
    </thead>
    
    <tr align="left">
    <td><span datafld="TITLE"></span></td>
    <td><span datafld="ARTIST"></span></td>
    <td><span datafld="YEAR"></span></td>
    </tr>
    </table>
    
    </body>
    </html>
    It works fine in IE5.0 but it doesnt work on any of the linux browsers....
    can anyone help
    jubs

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    well what happens when your browser tries to read it? and which browsers have you tried?
    -lakerdonald

  3. #3
    Linux Engineer
    Join Date
    Nov 2004
    Location
    Montreal, Canada
    Posts
    1,267
    This is totally "normal"
    since M$ internet explorer uses is "OWN" law, rules, standard, you'll always some problem with cross "standard" application ... your code runs great on IE but not in Firefox (windows and Linux)

    datasrc isn't a valid table tag.. that's why you're having this error... if you want to build completely "valid" multistandard web application/page, get your page revised by W3C...

    \"Meditative mind\'s is like a vast ocean... whatever strikes the surface, the bottom stays calm\" - Dalai Lama
    \"Competition ultimatly comes down to one thing... a loser and a winner.\" - Ugo Deschamps

  4. #4
    Just Joined!
    Join Date
    Nov 2004
    Location
    Bangalore,India
    Posts
    6
    Thnx,
    Descamps right it will work only on IE5.0 and higher. I have to use either css, xslt or some other unknown crap to display xml on my browser.
    thanks again

  5. #5
    Linux Engineer
    Join Date
    Nov 2004
    Location
    Montreal, Canada
    Posts
    1,267
    No problem mate...
    if you need any more hepl regarding HTML, dont hesitate to pm me
    \"Meditative mind\'s is like a vast ocean... whatever strikes the surface, the bottom stays calm\" - Dalai Lama
    \"Competition ultimatly comes down to one thing... a loser and a winner.\" - Ugo Deschamps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •