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?
Have you tried "XElement.Parse"? https://docs.microsoft.com/en-us/dotnet/api/system.xml.linq.xelement.parse?view=net-5.0
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.