W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2001

Help please! Problem with insertBefore

From: Andre Berkowitz <obsessed@adelphia.net>
Date: Wed, 13 Jun 2001 19:47:18 -0700
Message-ID: <001001c0f47c$542e81f0$f7cb3318@theobsession>
To: <www-dom@w3.org>
Hi there,
I have an ASP script that uses the XML dom to take the values of HTML form fields and append them to my XML file. I want it to append my new field entries to the top of my XML file, so I am attempting to use the insertBefore method to insert my new field entries to the top of my file.
My XML file has a root element called "fanml" and a container element for each new entry called "news". How do I use the insertBefore method (in VB) to insert my new news elements before my old ones? (to the top of the file). I have tried using:
 objDom.insertBefore objNews, objRoot.childNodes(1)
But I get an error when I submit my form.

Any help is greatly appreciated.
Received on Wednesday, 13 June 2001 19:59:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:48 GMT