473,549 Members | 2,784 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Ajax Problem, Read Content from XML Document

Hi

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

response = http.responseXM L.documentEleme nt;
up_since =response.getEl ementsByTagName ('up_since')[0].firstChild.dat a;

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

Error: response.getEle mentsByTagName( "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>11243 57455</up_since><up_du ration>16363</up_duration><co nnected_users>0 </connected_users ><active_users> 0</active_users><a llowed_users>1</allowed_users>< verification_ma trix><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_ma trix><gateway_a ddress>geldwolf 2.trispen.com</gateway_address ><company>trisp en</company><admin_ email></admin_email></engine_status>
If I enter the codefragment:

alert(http.resp onseXML.documen tElement.firstC hild.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 1636
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
7454
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 new page that should replace an existing one. I.e when we issue an Ajax request we don't know what will be returned and analyze the response to act...
23
5000
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 from another HTML page viewed in IE7, that is also UTF-8 encoded (search for "china" on google.com). I paste the chineese chars into a content...
0
2453
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 keywords presence in database and returns matched records count. Below is the code for 2 pages. First page would take an input, post to the second via...
1
1761
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 column 2 row setup in css. The links are in the top div and the content loads in the main div. The only problem I thought may have been causing it was...
4
2521
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 getElementByID but the code is as per an example on a tutorial website (http://www.tizag.com/ ajaxTutorial/ajax-javascript.php). The Select element is as...
0
7172
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 the way. First, deep linking is not something that a completely AJAX web site should be able to do by it's very nature of everything being on one...
2
3136
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 i change something in php file using in ajax function.it not refreshed,means its shows the previous result it not get updated.i can't understand...
1
1605
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 unique). Your code is changing (and reporting that state of) the hidden one and hence the visible one isn't changing.
6
9801
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 valid, it will always appear as null. I am just returning some basic XML like: <?xml version='1.0' encoding='UTF-8'?> <XMLData>
0
7446
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7715
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7469
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7808
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6040
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5087
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1057
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
757
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.