c# - Read data from XElement that has elements mixed with plain content -
xelement has following value:
<parent><child>text inside element</child>and plain content</parent> how can convert string contains: "text inside element , plain content".
what i've tried already?
i tired use xelement.value, concats 2 nodes without putting space between them: "text inside elementand plain content".
the text looking stored in nodes of type xtext. can @ these nodes this:
xelement.descendantnodes() .oftype<xtext>() .select(t => t.value) that give result:
text inside element , plain content you concatenate these wish (for example string.join).
Comments
Post a Comment