我看过C# deserialize xml error ReadElementContentAs() methods cannot be called on an element that has childelements,但我的情况似乎有所不同。我正在尝试使用的XML看起来像这样: <SampleXML> <SomeElement2>SomeValue2</,在MyClass.
我正在尝试从元素下面提取元素。我似乎被其中一个元素挂住了,在这个元素下有一个名称空间限定符<rd:TypeName>
我一直在使用LINQ to XML来处理文件中没有名称空间限定符的其他部分,方法是指定一个默认的名称空间。reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportd