Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 25th, 2008, 05:10 AM
Registered User
Join Date: Feb 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default The reference node is not a child of this node.XSL

I am getting error "The reference node is not a child of this node" while using system.xml.It works fine for MSXML3.0.

aResponseDocument.DocumentElement.InsertBefore(oTe mpDOM.DocumentElement, oEmpNode)

kindly help me to find equilvalent in system.xml.

Old February 25th, 2008, 05:15 AM
mhkay's Avatar
Wrox Author
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts

You've posted on the wrong forum - this area is for XSLT questions, whereas your problem is related to DOM.

I'm no expert on DOM but I think that if you do

a.InsertBefore(b ,c)

then b must be a child of a, and the message is telling you that it isn't (it's probably the same node as a)

Michael Kay
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Old February 25th, 2008, 05:22 AM
joefawcett's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts

Could also be that you are trying to add a node from a different document. You need to use ImportNode for this, MSXML deviates from the spec in this regard. It suggests you use CloneNode but also allows direct usage in some scenarios.


Joe (Microsoft MVP - XML)

Similar Threads
Thread Thread Starter Forum Replies Last Post
Select correct child node richieWolf XSLT 4 September 24th, 2008 08:53 AM
how to append child node after an node in XML + C# vishnu108mishra XML 5 November 13th, 2007 05:30 AM
Select node whose child value matches Fantmx XSLT 5 February 16th, 2007 04:54 PM
How to count the child node suri_1811 XSLT 6 November 10th, 2006 04:51 PM
Child Node Output Neal XSLT 0 June 7th, 2006 03:14 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.