4
我有一個XElement
,它有這樣的內容。如何從LINQ到XML中的XElement中讀取特定元素值
<Response xmlns="someurl" xmlnsLi="thew3url">
<ErrorCode></ErrorCode>
<Status>Success</Status>
<Result>
<Manufacturer>
<ManufacturerID>46</ManufacturerID>
<ManufacturerName>APPLE</ManufacturerName>
</Manufacturer>
//More Manufacturer Elements like above here
</Result>
</Response>
我將如何讀Status
元素中的價值?
我試過XElement stats = myXel.Descendants("Status").SingleOrDefault();
但是,返回null。