XML error, any ideas..

Results 1 to 2 of 2

Thread: XML error, any ideas..

  1. #1
    Join Date
    Dec 1969

    Default XML error, any ideas..

    I am trying to write out the values of a few items from my XML file. However, not all the elements are present at all times. Is there any way I can check to see if that element is there before attempting to write it out? I will never know in advance which elements will be present, and which wont. When I try to access an element that is not there I get:<BR>Microsoft VBScript runtime error &#039;800a01a8&#039; <BR>Object required: &#039;[object]&#039; <BR>/xml/trial.asp, line 20 <BR>Thanks.<BR>

  2. #2
    Ryan Duffield Guest

    Default RE: XML error, any ideas..

    If you&#039;re using the XMLDOM, I think you can do something like xmlDoc.getElementsByTagName("myElement") and it will return a collection of elements with the given name. If it doesn&#039;t return anything, you know that the element doesn&#039;t exist.<BR><BR>Hope that helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts