BizTalk Utilities CV ,   Jobs ,   Code library  
 
Home Page
XML DOM
The DOM Method: hasChildNodes()
The DOM Method: getNamedItem()
The DOM Method: getElementsByTagName()
The DOM Method: getAttributeNode()
The DOM Method: getAttribute()
The DOM Method: createNode()
The DOM Method: Create - other examples
The DOM Method: cloneNode()
The DOM Method: appendChild()
The DOM Method: abort()
The DOM Method: DOM object methods
The Node Type: NODE_TEXT
The Node Type: NODE_PROCESSING_INSTRUCTION
The Node Type: NODE_NOTATION
The Node Type: NODE_ENTITY_REFERENCE
The Node Type: NODE_ENTITY
The Node Type: NODE_ELEMENT
The Node Type: NODE_DOCUMENT_TYPE
The Node Type: NODE_DOCUMENT
The Node Type: NODE_COMMENT
<< XHTML
XmlSerializer >>

By :Mark Wilson
I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First posted :03/24/2008
Times viewed :1286

 

insertBefore()

Is a member of:
DOMDocument
XMLDOMNode
XMLDOMAttribute
XMLDOMCDATASection
XMLDOMComment
XMLDOMDocumentFragment
XMLDOMDocumentType
XMLDOMElement
XMLDOMEntity
XMLDOMEntityReference
XMLDOMNotation
XMLDOMProcessingInstruction
XMLDOMText
XTLRuntime

Syntax

set objXMLDOMNode = objXMLDOMNode.insertBefore(newChild, refChild)

Remark

This method inserts a new child Node before the current Node (objXMLDOMNode).

From the methods signature, if you do not include a parameter, refChild, then this function acts the same as the appendChild() method. Here the refChild must be a child Node of the current Node (objXMLDOMNode). This indicates that the new child must be inserted before this refChild Node (which is the left sibling).

The DOMDocument checks that the refChild is a child Node of the current Node (objXMLDOMNode). If it is not, then an error will occur.

This method returns the child that has been successfully inserted. The method will return an error if you have tried to do an impossible operation, such as adding a Node of type NODE_DOCUMENT_TYPE (which cannot be a child Node), or the refChild is not a child Node of the current Node. See the nodeType property and the createNode() method for more information on types of Nodes.


This manuscript is an abridged version of a chapter from the Manning Publications book XML Programming with VB and ASP. This chapter looks at the Microsoft DOM objects. NOTE: Most images have been removed to increase speed and many of the code comments have also been removed for presentation. Please purchase the book to enjoy the full experience of all the chapters with images and code comments!


Rate this article on a scale of 1 to 10

Your vote :  


 

Recent Jobs

Integration Specialist Needed - Wor
Virtualization Server Infrastructur
A great opportunity to Digital Vide
here is a greate opportunity as a S
A great opportunity as a Network En

View all Jobs (Add yours)
View all CV (Add yours)




swimming pool builder
chicago web site design
spfxmasks
Cheap Web Hosting
conference calling
Versace sunglasses
answering service


    Email TopXML  

Front Page Daily Stuff TopXML Forum XML blogs XML Newsgroups BizTalk Biztalk Utilities Biztalk Utilities Tutorial B2B SAP XML Microsoft .NET Dotnet System XML Soapformatter SQLXML XMLserializer XQuery PHP PHP SimpleXML PHP XML Dom PHP XML RPC PHP XSLT Java Java Java XML Xalan Microsoft ASP ASP Schemas XML SQL Server XML XMLDom XSL XSL Tutorial XSLT Stylesheets General Javascript CSS XHTML WAP