从列表中提取标题

时间:2016-04-13 12:45:26

标签: r

以下是列表的一部分,如下所示:

$item_data
<item_data>
  <item_basic_data>
    <item_unique_id>B003U8EMDA</item_unique_id>
    <item_sku>B003U8EMDA</item_sku>
    <parent_asin>B003U8EMDA</parent_asin>
    <item_upc>885480182565</item_upc>
    <item_mpn>GZDY019-264</item_mpn>
    <item_brand>SIB</item_brand>
    <item_name>Laptop AC Adapter/Power Supply/Charger+US Power Cord for Dell Studio 1435 1450 1457 14z 15 1536 1537 1555 1557 17 1735 1736 1737 1745 1747 PP33L pp31l</item_name>
    <item_model>GZDY019-264</item_model>
    <item_category>Personal Computer</item_category>
    <item_short_desc>&lt;br&gt;DC-Output : 19.5V-4.62A-90W - Input : 100-240V 1.5A 50/60 Hz&lt;br&gt;Package Includes : One AC Adapter and One US Power Cord for Listed Models&lt;br&gt;100% OEM compatible&lt;br&gt;This Product has 12 MONTHS REPLACEMENT WARRANTY</item_short_desc>
    <item_page_url>http://www.amazon.in/dp/B003U8EMDA/ref=asc_df_B003U8EMDA33161676/?tag=ihre_partner_id&amp;creative=165953&amp;creativeASIN=B003U8EMDA&amp;linkCode=df0</item_page_url>
    <amzn_page_url>http://www.amazon.in/dp/B003U8EMDA/ref=asc_df_B003U8EMDA33161676/?tag=ihre_partner_id&amp;creative=165953&amp;creativeASIN=B003U8EMDA&amp;linkCode=df0</amzn_page_url>
    <fm_page_url>http://www.amazon.in/dp/B003U8EMDA/ref=asc_df_B003U8EMDA33161676?smid=A1JV1LN0Y6K86J&amp;tag=ihre_partner_id&amp;linkCode=df0&amp;creative=165953&amp;creativeASIN=B003U8EMDA</fm_page_url>
    <offer_page_url>http://www.amazon.in/gp/offer-listing/B003U8EMDA/ref=asc_df_B003U8EMDA33161676?ie=UTF8&amp;condition=new&amp;tag=ihre_partner_id&amp;creative=165953&amp;creativeASIN=B003U8EMDA&amp;linkCode=df2</offer_page_url>
    <offer_used_url>http://www.amazon.in/gp/offer-listing/B003U8EMDA/ref=asc_df_B003U8EMDA33161676?ie=UTF8&amp;condition=used&amp;tag=ihre_partner_id&amp;creative=165953&amp;creativeASIN=B003U8EMDA&amp;linkCode=df2</offer_used_url>
    <tp_fba_url/>
    <item_image_url>http://ecx.images-amazon.com/images/I/51v8FxFP56L._SL160_.jpg</item_image_url>
    <item_image_url_small>http://ecx.images-amazon.com/images/I/51v8FxFP56L._SL75_.jpg</item_image_url_small>
    <item_image_url_large>http://ecx.images-amazon.com/images/I/51v8FxFP56L.jpg</item_image_url_large>
    <item_salesrank>6039</item_salesrank>
    <item_price>1263.00</item_price>
    <item_inventory>Usually dispatched within 6-10 business days</item_inventory>
    <item_shipping_charge>0.00</item_shipping_charge>
    <item_merchant_id>A1JV1LN0Y6K86J</item_merchant_id>
    <fm_price>1263.00</fm_price>
    <fm_inventory>Usually dispatched within 6-10 business days</fm_inventory>
    <fm_shipping_charge>0.00</fm_shipping_charge>
    <fm_merchant_id>A1JV1LN0Y6K86J</fm_merchant_id>
    <tp_new_price>1263.00</tp_new_price>
    <tp_new_inventory>Usually dispatched within 6-10 business days</tp_new_inventory>
    <tp_new_shipping_charge>0.00</tp_new_shipping_charge>
    <tp_new_merchant_id>A1JV1LN0Y6K86J</tp_new_merchant_id>
  </item_basic_data>
  <merch_cat_list>
    <merch_cat_item>
      <merch_cat_name>1375310031</merch_cat_name>
      <merch_cat_path>Computers &amp; Accessories/Categories/Accessories/Laptop Accessories/Chargers &amp; Power Supplies</merch_cat_path>
    </merch_cat_item>
  </merch_cat_list>
</item_data> 

现在,我只需要介于&lt;之间的数据。 &gt;,例如,item_unique_id介于两者之间。有没有办法我们可以提取&amp;将其存储在数据框中?

结果显示

需要在数据框中提取如下所示的标题, 只是标题

item_unique_id      item_sku       parent_asin    item_upc     item_mpn

注意:上面代码的类是“XMLInternalNodeList”“XMLNodeList”

0 个答案:

没有答案