Thread View: borland.public.delphi.xml
6 messages
6 total messages
Started by Maz Alf
Tue, 17 Jun 2008 23:28
String to XML Node - Is it possible ?
Author: Maz Alf
Date: Tue, 17 Jun 2008 23:28
Date: Tue, 17 Jun 2008 23:28
14 lines
1279 bytes
1279 bytes
Hello, Only new to XML so I'm still finding my way. And Delphi Documentation is not very useful. I am trying to implement a "copy and paste" routine where I can copy a node and its children to another part of the tree. I implemented to copy by doing a "Str := Node.xml" but I can't find a way of pasting the string back over another tree node. Is it possible ? Or am I going about it the wrong way ? Regards, Maz
Re: String to XML Node - Is it possible ?
Author: Remy Lebeau (TeamB)
Date: Wed, 18 Jun 2008 00:02
Date: Wed, 18 Jun 2008 00:02
12 lines
1383 bytes
1383 bytes
"Maz Alf" <MazAlfdot@bigpond.comdot> wrote in message news:48584887$1@newsgroups.borland.com... > I implemented to copy by doing a "Str := Node.xml" but I can't > find a way of pasting the string back over another tree node. Why not simply move the original nodes directly? You don't need to serialize them to a String in between. Gambit
Re: String to XML Node - Is it possible ?
Author: Maz Alf
Date: Wed, 18 Jun 2008 02:07
Date: Wed, 18 Jun 2008 02:07
8 lines
1271 bytes
1271 bytes
Hello As indicated its a real "copy and paste". The user can "copy" a set of notes, which I perform using the Node.XML and then may or may not perform the paste. Originally my idea was to actually copy to the clipboard as text. Regards, Maz
Re: String to XML Node - Is it possible ?
Author: Stefan M. Huber
Date: Wed, 18 Jun 2008 06:19
Date: Wed, 18 Jun 2008 06:19
14 lines
1414 bytes
1414 bytes
On Wed, 18 Jun 2008 04:07:15 +0200, Maz Alf <MazAlfdot@bigpond.comdot> wrote: > Hello > > As indicated its a real "copy and paste". The user can "copy" a set of > notes, which I perform using the Node.XML and then may or may not perform > the paste. > Originally my idea was to actually copy to the clipboard as text. Remember the XML node on which the user chose to copy. Then traverse the node tree recursively and append the same nodes to the target node. Stefan
Re: String to XML Node - Is it possible ?
Author: Maz Alf
Date: Wed, 18 Jun 2008 09:55
Date: Wed, 18 Jun 2008 09:55
22 lines
1976 bytes
1976 bytes
"Stefan M. Huber" <looseleaf@gmx.net> wrote in message > Remember the XML node on which the user chose to copy. Then traverse the > node tree recursively and append the same nodes to the target node. Hi Stefan, Yes I understand what you mean but as in most cut and paste situations there is a period of time between the cut and the paste this could be minutes or hours and the children of the cut node could change it that time frame. I need to cut and park away a node and children at a point in time then, if the user decides to do a paste, and they may not, I need to paste it back again. I've see there is a node type of "document fragment" maybe I need to create one of these, copy the node to it and when required paste the fragment back to the main tree. Does that sound right ? Can any one point me to an example that uses document fragments? Thx Maz
Re: String to XML Node - Is it possible ?
Author: Stefan M. Huber
Date: Wed, 18 Jun 2008 10:27
Date: Wed, 18 Jun 2008 10:27
13 lines
1491 bytes
1491 bytes
On Wed, 18 Jun 2008 11:55:16 +0200, Maz Alf <MazAlfdot@bigpond.comdot> wrote: > I need to cut and park away a node and children at a point in time then, > if the user decides to do a paste, and they may not, I need to paste it > back > again. Well, you have a well formed XML string. You could create a temporary XMLDocument when pasting and feed it with the saved string (LoadFromXML). Then you have a separate XML tree which you can traverse. Stefan
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads