阅读背景:

XElement.Element无法选择正确的子节点

来源:互联网 

I have the following XML:

我有以下XML:

<inventory>
  <item>
    <stocktype>
      <type>Basket</type>
      <id>1</id>
      <parentId>0</parentId>
    </stocktype>
    <cost>10.00</cost>
    <quantity>1</quantity>
    <name>Golden Wick Basket</name>
    <note>
      <code>remark</code>
      <content>Be extra careful about the golden paint....</content> 
    </note> 
    <note>
      <code>usage</code>
      <content>DeluxFruitBasket</content> 
    </note>  
  </item>
  <item>
    <stocktype>
      <type>Fruit</type>
      <id>2</id>
      <parentId>1</parentId>
    </stocktype>
    <cost>6.00</cost>
    <quantity>10</quantity>
    <name>Apple</name>
    <note>
      <code>remark</code>
      <content>Please pick red apples only</content> 
    </note>
    <note>
      <code>usage</code>
      <content>DeluxFruitBasket</content> 
    </note>
  </item>
  <item>
    <stocktype>
      <type>Fruit</type>
      <id>3</id>
      <parentId>1</parentId>
    </stocktype>
    <cost>4.00</cost>
    <quantity>10</quantity>
    <name>Orange</name>
    <note>
      <code>remark</code>
      <content></content> 
    </note>
    <note>
      <code>usage</code>
      <content>DeluxFruitBasket</content> 
    </note>
  </item>
  <item>
    <stocktype>
      <type>Fruit</type>
      <id>4</id>
      <parentId>1</parentId>
    </stocktype>
    <cost>12.00</cost>
    <quantity>1</quantity>
    <name>Pineapple</name>
  </item>
</inventory>
<invento



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: