SaeidRezaei90 / xmlParser

This is a very simple code which parse an xml document and extract the values. xml.etree module is used to parse the xml document

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

xmlParser

This is a very simple code which parse an xml document and extract the values. xml.etree module is used to parse the xml document.

XML document:

<shiporder orderid="889923"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="shiporder.xsd">
  <orderperson>John Smith</orderperson>
  <shipto>
    <name>Ola Nordmann</name>
    <address>Langgt 23</address>
    <city>4000 Stavanger</city>
    <country>Norway</country>
  </shipto>
  <item>
    <title>Empire Burlesque</title>
    <note>Special Edition</note>
    <quantity>1</quantity>
    <price>10.90</price>
  </item>
  <item>
    <title>Hide your heart</title>
    <quantity>1</quantity>
    <price>9.90</price>
  </item>
</shiporder>

Result

About

This is a very simple code which parse an xml document and extract the values. xml.etree module is used to parse the xml document


Languages

Language:Python 100.0%