Hello everyone.
I used javascript code to read a simple and specific xml file into html. I just accomplished that with no sweat. But after awhile I became aware of alot of redundancy within the text, so I've tried entities to lightweight a bit the xml files. Entities can act as variables in XML: The following code works 100% on Firefox, Opera, Chrome and Safari:
And there's IE and why so many people think it sucksCode:<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE info [ <!ENTITY asjc "Walter Rodder Fairy"> <!ENTITY em "craigwerteston@aol.au"> <!ENTITY au "Craig Werteston"> ]> <info> <pais id="NZ"> <ref nr="1"> <lic>0</lic> <titl>&asjc;</titl> <mail>&em;</mail> <aut>&au;</aut> <data>March of 2012</data> <desc>Description stuff, blah, blah</desc> </ref> </pais> </info>. I am using IE8 for testing and after reading the XML file somehow it doesn't understand the entity var and parses a NULL value. The other text which is not an entity it goes well. Can somebody know some good solution for this? I have been told that IE9 works fine, but didn't checked it. Thanks.


. I am using IE8 for testing and after reading the XML file somehow it doesn't understand the entity var and parses a NULL value. The other text which is not an entity it goes well. Can somebody know some good solution for this? I have been told that IE9 works fine, but didn't checked it. Thanks.
Reply With Quote

Bookmarks