简体   繁体   中英

Parse partial XML string to list of XElements

I have a partial XML string without a root element. Eg:

<Item Id="1">some text</Item>
<Item Id="2">some other text</Item>

I need to convert this string to a list of XElements.

Is there a way to do this without adding a dummy root element or splitting the string?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM