In OmniUtils there was a method: CopyNode to copy complete XML node tree from one node to an other. I can not find one i OXML. Could someone please supply a sample on how to achieve the same?
Best
Jens G
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is a function CloneNode in TXMLNode. For whole node tree use "aDeep = true". Don't forget to append the result node wherever you want with AppendChild.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I need to clone node to another doc.
But I receive error from compilator "project1.lpr(43,38) Error: Incompatible type for arg no. 2: Got "IXMLDocument", expected "TXMLDocument"" on CloneNode line. I used IXMLDocument as in OXml examples project and site.
First I thought that the compiler may be confused about an overloaded interface/class parameter but it looks like the compiler can choose the right function. So I renamed it.
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
In OmniUtils there was a method: CopyNode to copy complete XML node tree from one node to an other. I can not find one i OXML. Could someone please supply a sample on how to achieve the same?
Best
Jens G
There is a function CloneNode in TXMLNode. For whole node tree use "aDeep = true". Don't forget to append the result node wherever you want with AppendChild.
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Perfect. Thanks a lot
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
I need to clone node to another doc.
But I receive error from compilator "project1.lpr(43,38) Error: Incompatible type for arg no. 2: Got "IXMLDocument", expected "TXMLDocument"" on CloneNode line. I used IXMLDocument as in OXml examples project and site.
Then I try to change IXMLDocument to TXMLDocument. And Clone works.
What is difference between IXMLDocument and TXMLDocument? What is right to use?
How to clone node when using IXMLDocument?
I added TXMLNode.CloneNode2 with IXMLDocument as parameter (rev 81).
https://sourceforge.net/p/oxml/code/81/
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Thanks )
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Can you rename CloneNode2 to default CloneNode? I tell about overload modifier.
I do not like redundant "2".
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
First I thought that the compiler may be confused about an overloaded interface/class parameter but it looks like the compiler can choose the right function. So I renamed it.
https://sourceforge.net/p/oxml/code/84
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Works. Thanks )