Yes, it's suggested on the SO, but in the answer it's also rejected by the questioner.
I have to agree with the questioner - you want to use XML DOM for something it's not supposed to be used.
If you want to link some data to TXMLNode, use TDictionary<txmlnode, ???=""> or TODictionary from ODictionary.pas.</txmlnode,>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, thank you for your suggestion about linking data to TXMLNode with your ODictionary.pas ! It works fine ! Nonetheless, this will involve more variables.
Could you help to comment whether it is bad to add a "Data: Pointer"field ? The TComponent has a Tag property to store customized data. :D
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
In http://stackoverflow.com/questions/1841621, it is suggested that "XML DOM" can be used as non-visual tree data structure.
Because a "Data: Pointer" field can make a tree node more useful, could you add a "Data: Pointer" field to OXml TXMLNode ?
Best regards,
Jiaguo
Yes, it's suggested on the SO, but in the answer it's also rejected by the questioner.
I have to agree with the questioner - you want to use XML DOM for something it's not supposed to be used.
If you want to link some data to TXMLNode, use TDictionary<txmlnode, ???=""> or TODictionary from ODictionary.pas.</txmlnode,>
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi, thank you for your suggestion about linking data to TXMLNode with your ODictionary.pas ! It works fine ! Nonetheless, this will involve more variables.
Could you help to comment whether it is bad to add a "Data: Pointer"field ? The TComponent has a Tag property to store customized data. :D
As I said before, XML DOM is not supposed to store customized data in the nodes.
Furthermore, pointers are not a good solution for mobile platforms.