Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 25th, 2008, 05:10 AM
Registered User
 
Join Date: Feb 2008
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default The reference node is not a child of this node.XSL


Hi,
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.


Reply With Quote
  #2 (permalink)  
Old February 25th, 2008, 05:15 AM
mhkay's Avatar
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

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
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply With Quote
  #3 (permalink)  
Old February 25th, 2008, 05:22 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

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)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 05:14 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.