473,394 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Ajax Problem, Read Content from XML Document

Hi

I try to parse an XML Document with the following commands:

response = http.responseXML.documentElement;
up_since =response.getElementsByTagName('up_since')[0].firstChild.data;

So I try to read out the value for up since, but then I get the error
message

Error: response.getElementsByTagName("up_since")[0] has no properties
Source File: http://localhost/BabysteptestXML.htm
Line: 28

The XML Document generated by my CGI PRogramm looks like this:

<?xml
version="1.0"?><engine_status><up_since>1124357455 </up_since><up_duration>16363</up_duration><connected_users>0</connected_users><active_users>0</active_users><allowed_users>1</allowed_users><verification_matrix><tr><td>sr</td><td>kj</td><td>bc</td><td>tg</td><td>pf</td></tr><tr><td>ph</td><td>gt</td><td>cq</td><td>fk</td><td>pk</td></tr><tr><td>hm</td><td>tc</td><td>rj</td><td>ee</td><td>tb</td></tr><tr><td>se</td><td>gs</td><td>fk</td><td>ag</td><td>hg</td></tr></verification_matrix><gateway_address>geldwolf2.tri spen.com</gateway_address><company>trispen</company><admin_email></admin_email></engine_status>
If I enter the codefragment:

alert(http.responseXML.documentElement.firstChild. nodeValue);

I got the error message: XML Parsing Error: xml processing instruction
not at start of external entity. Anyone encountered this problem before
and knows what it does mean?
Cheers for Hints!

Aug 19 '05 #1
1 1627
Found the error in the meantime there was a whitespace at the beginning
of the xmlresponse... sorry for bothering u

Best wishes Patrick

Aug 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: evgenyg | last post by:
Hello ! We have the following situation - when Ajax request is sent what's being returned by the server is usually an XML (which is used for DOM updates) but sometimes it's HTML which is a whole...
23
by: Allan Ebdrup | last post by:
I hava an ajax web application where i hvae problems with UTF-8 encoding oc chineese chars. My Ajax webapplication runs in a HTML page that is UTF-8 Encoded. I copy and paste some chineese chars...
0
by: BlipBlip | last post by:
Hi All, I was not sure which forum to post the message to since the problem related to ASP/AJAX, but decided to post it here. I have a simple routine which utilizes an Ajax to query database for...
1
by: JohnnieTech | last post by:
I am using some javascript/ajax to load content into a main div. The problem I am running into is that it will work in IE but not in FF. In FF I don't get any sort of load at all. I have a 1...
4
by: UKuser | last post by:
Hi, I'm working on the following code, which works fine in Firefox, but not in IE. The problem is its not posting the variable to my page and I'm thinking its something wrong with the...
0
by: Tarik Monem | last post by:
I have been working on an all AJAX/DOM web site which is set to go live today and I thought I'd share my discoveries with all of you whom have helped me when I have encountered different issues along...
2
by: shivendravikramsingh | last post by:
hi friends, i m using a ajax function for retrieving some values from a database table,and display the values in required field,my prob is that the ajax function i m using is working f9 once,but if...
1
by: Robin | last post by:
Martin wrote: .... You appear to be putting the responseText into DIV 'htmlText' then 'hiddenDiv'. You therefore have two DIVs with id 'divslct4' (not legal as IDs are supposed to be...
6
by: KDawg44 | last post by:
Hi, My responseXML is always null on my AJAX call. When I browse directly to the PHP script I am calling, the XML file shows up just fine. I have read that if a returned XML file is not...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.