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

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -