473,321 Members | 1,708 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,321 software developers and data experts.

getElementsByTagName returns empty list in IE

I have a problem with XML in IE7 that I cannot understand. To keep it simple, I have loaded an XML document from the server and extracted some data successfully using getElementsByTagName. This works on both IE and Mozilla based browsers.

I now want to add this data to a second XML document. I have loaded the document, use getElementsByTagName to locate where the data should go then add it. This works with Mozilla but IE returns an empty list suggesting it can't find the tag.

Anybody know why the method should work on the first document but not the second, yet works perfectly on both documents with Mozilla?

Many Thanks
Feb 9 '09 #1
2 4962
jkmyoung
2,057 Expert 2GB
Would have to see the code. Could be any of a number of things.
Feb 9 '09 #2
Thanks for the offer but I finally solved i. The problem was that the XML had an xsl-stylesheet with type="text/xml" and of course IE doesn't like this so got an empty responseXML and hence the empty list.
Feb 9 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: tornado | last post by:
Hi all, I am pretty new to PHP. I was reading PHP manual and trying out the example from 2nd chapter (A simple Tutorial). When i try to print the variable as given in the example it returns...
23
by: Michel Bany | last post by:
I am trying to parse responseXML from an HTTP request. var doc = request.responseXML; var elements = doc.getElementsByTagName("*"); the last statement returns an empty collection when running from...
7
by: Dima | last post by:
Call to XmlNode.GetElementsByTagName returns XmlNodeList that stays in sync with XmlDocument thanks to events fired by XmlDocument. Once this list is created there is no way to remove its event...
59
by: Pierre Quentel | last post by:
Hi all, In some program I was testing if a variable was a boolean, with this test : if v in My script didn't work in some cases and I eventually found that for v = 0 the test returned True ...
2
by: JJA | last post by:
Here is my entire XML file - simplified to one node for testing: <root> <FlasConustbl> <ID>42101</ID> <AWARD>P015B030001</AWARD> <INSTITUTION_KEY>300</INSTITUTION_KEY> <INSTITUTION>Boston...
1
by: Max | last post by:
Hello everyone! i would want to know if the getElementsByTagName() function starts to find the elements from documentElement comprising the same documentElement. XML example: <?xml...
4
by: logiczero | last post by:
Here's my code: === var content = document.getElementById('content'); var collection = content.getElementsByTagName('div'); for (var i = 0; i < collection.length; i++) { alert(collection.id);...
1
by: Ben | last post by:
I have a web service that returns the following xml: <?xml version="1.0" encoding="utf-8" ?> <NewDataSet> <Addresses> <XML_F52E2B61-18A1-11d1-B105-00805F49916B> <CustomerAddressBase...
3
by: =?Utf-8?B?RWFnbGVSZWRASGlnaEZseWluZ0JpcmRzLmNvbQ== | last post by:
I am writing an application using VS2005 and I am using javascript on the client side. I have a table that contains textboxes and I want to set the contents of all of them to the empty string in...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.