Closed melven closed 2 years ago
Based on this idea, I implemented #204 and #205.
Only difference from the example here: the element name for tixiImportElementFromString
is not supplied as argument but is defined in the XML string itself (the top level element name).
I like the suggestion! Thanks for your PRs!
Hi,
we have some problems with elements that contain comments. In particular, I currently see no way to generate an element that has text and comments like this:
The function
tixiGetTextElement
returns the text without comments (which is a reasonable behavior that we also need).But for a user of our GUI, it would be nice to actually edit the text together with possible comments.
So one generic idea would be to provide the following two (generic) functions that could also be handy in other cases:
tixiExportElementAsString
is liketixiExportDocumentAsString
but only handles the subtree below the given element.tixiImportElementFromString
behaves similar totixiCreateElement
but the complete content/subtree below the created element is given as "raw" xml string.Implementation would be similar to the handling of external data nodes but it just allows very powerful "raw" manipulation of XML subtrees...
What do you think?