Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read XML into HTML5

Status
Not open for further replies.

Leozack

MIS
Oct 25, 2002
867
GB
Hi all - I think I'm going insane!
All I wanted to do was read an XML file into HTML so I could use it to store info - I've done this in a flash/actionscript app and it was all fine. Now I'm trying to do it to HTML and multi-fail!

I've googled lots of sites and tried various things but I keep getting "null" when I try to spit out the xmlDoc I've loaded.
On this site
if I add the line
document.write(xmlDoc);
after the line
xmlDoc=xmlhttp.responseXML;
I get
[object Document]
but even copying that page contents and XML file to my own server and running it I still just get "null".
I'm about ready to jump out the window, so I'm hoping someone can find me a working load method (then I can worry about all the parsing, next). I haven't tried jquery methods yet as I've yet to use jquery.

_________________________________
Leozack
Code:
MakeUniverse($infinity,1,42);
 
Hi

Then you have to debug the AJAX part. First check if your server
[ul]
[li]sends the XML data[/li]
[li]sends text/xml HTTP response header[/li]
[/ul]


Feherke.
feherke.ga
 
I'm not familiar with AJAX really. I was hoping to just follow a tutorial for the basic loading!
How can I check what you're asking precisely?

_________________________________
Leozack
Code:
MakeUniverse($infinity,1,42);
 
Hi

Use your browser's web developer tools, either the built-in one or an addon like FireBug for FireFox or DragonFly for Opera. Those will display information about the AJAX request either in the Console and/or the Net tab.


Feherke.
feherke.ga
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top