getElementsByTagName returns empty list in IE

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • georgen
    New Member
    • Feb 2009
    • 2

    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 getElementsByTa gName. 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 getElementsByTa gName 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
  • jkmyoung
    Recognized Expert Top Contributor
    • Mar 2006
    • 2057

    #2
    Would have to see the code. Could be any of a number of things.

    Comment

    • georgen
      New Member
      • Feb 2009
      • 2

      #3
      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.

      Comment

      Working...