Xml parsing in C # .net Core

It seems to be System.Xmlunavailable in the .net kernel (unit test)

I found the nu get package called DocumentFormat.OpenXml, but could not find code examples on how to use it.

My requirement is simply to parse one such element. Any suggestions.

"<message Att='Hello'/>"
+4
source share
1 answer

I see a comment for using Linq and recommend following this route. However, I personally have not tried this in .NET Core.

Try something like ...

var value = "<message Att='Hello'/>";
var xml = XDocument.Parse(value);
+1
source

Source: https://habr.com/ru/post/1667720/


All Articles