Does anybody knows how to get the text of all the nodes below given node? for. e.g. if I want to get text of root element, it should give text of entire dom tree like msxml.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
From your question I'm not sure if you mean a way to convert the TinyXml DOM into a string representation of the DOM or to extract all the content of the text nodes into a single node?
i.e., this:
(a) dom -> "<?xml ?><container><string>Hello</string><string>There</string></container>"
or
(b) dom -> "HelloThere"
?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No prebuilt way exists for that function. My suggestion is to iterate through the DOM looking for text nodes, appending all the text to a string as you go.
HTH
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Does anybody knows how to get the text of all the nodes below given node? for. e.g. if I want to get text of root element, it should give text of entire dom tree like msxml.
From your question I'm not sure if you mean a way to convert the TinyXml DOM into a string representation of the DOM or to extract all the content of the text nodes into a single node?
i.e., this:
(a) dom -> "<?xml ?><container><string>Hello</string><string>There</string></container>"
or
(b) dom -> "HelloThere"
?
I mean (b) dom -> "HelloThere"
No prebuilt way exists for that function. My suggestion is to iterate through the DOM looking for text nodes, appending all the text to a string as you go.
HTH