Hướng dẫn dict to xml python - dict sang xml python

XML là viết tắt của ngôn ngữ đánh dấu mở rộng. XML được thiết kế để tự mô tả và lưu trữ và vận chuyển dữ liệu. Thẻ XML được sử dụng để xác định, lưu trữ và sắp xếp dữ liệu. Khối xây dựng cơ bản của tài liệu XML được xác định bởi các thẻ. Một phần tử có thẻ bắt đầu và thẻ kết thúc. Tất cả các phần tử trong XML được chứa trong một phần tử ngoài cùng gọi là phần tử gốc. stands for Extensible Markup Language. XML was designed to be self-descriptive and to store and transport data. XML tags are used to identify, store and organize the data. The basic building block of an XML document is defined by tags. An element has a beginning tag and an ending tag. All elements in an XML are contained in an outermost element called as the root element.

Example:  


DSA
2499/-

Trong ví dụ trên, GeekSforGeek là phần tử gốc và,, là các yếu tố.

Bây giờ, hãy để Lừa xem cách biến một từ điển thành XML: Để biến một từ điển thành XML trong Python, chúng tôi sẽ sử dụng thư viện xml.etree.elementtree. Thư viện xml.etree.elementtree thường được sử dụng để phân tích cú pháp và cũng được sử dụng trong việc tạo các tài liệu XML. Lớp ElementTree được sử dụng để bọc cấu trúc thành phần và chuyển đổi nó từ và sang XML. Kết quả của chuyển đổi này là một yếu tố. Đối với I/O, nó dễ dàng chuyển đổi điều này thành chuỗi byte bằng cách sử dụng hàm toString () trong xml.etree.elementtree.
For turning a Dictionary into XML in Python we will use xml.etree.ElementTree library. The xml.etree.ElementTree library is usually used for parsing and also utilized in creating XML documents. The ElementTree class is employed to wrap a component structure and convert it from and to XML. The result of this conversion is an Element. For I/O, it’s easy to convert this to a byte string using the tostring() function in xml.etree.ElementTree.

xml.etree.ElementTree.Element()Class: Class:

Lớp phần tử này xác định giao diện phần tử và cung cấp triển khai tham chiếu của giao diện này. & NBSP;

Cú pháp: phần tử (tag, attrib = {}, ** thêm) & nbsp; Element(tag, attrib = {}, **extra) 

Tham số: & nbsp; 

  • TAG: Đây là một chuỗi xác định loại dữ liệu mà phần tử này thể hiện. This is a string that identify what kind of data this element represents.
  • Attrible: Đây là một từ điển tùy chọn, chứa các thuộc tính phần tử. this is an optional dictionary, containing element attributes.
  • ** Thêm: Điều này chứa các thuộc tính bổ sung, được đưa ra dưới dạng đối số từ khóa. This contains additional attributes, given as keyword arguments.

Trả về: đối tượng phần tử & nbsp; Element object
 

xml.etree.ElementTree.tostring()Function: Function:

Hàm này tạo ra một biểu diễn chuỗi của phần tử XML. & NBSP;

Cú pháp: ToString (phần tử) tostring(element)

Tham số: Phần tử XMLXML element

Trả về: Biểu diễn chuỗi của phần tử XMLstring representation of an XML element

ElementObject.set()Method: Method:

Phương thức này đặt khóa thuộc tính trên phần tử thành giá trị. & NBSP;

Cú pháp: Đặt (khóa, giá trị) & nbsp; set(key, value) 

Parameter:  

  • Khóa: Đại diện cho thuộc tính.represent the attribute.
  • Giá trị: Đại diện cho giá trị của thuộc tính. represent value of attribute.

Trả lại: Không & NBSP; None
 

Bây giờ, hãy để Lừa xem chương trình Python để biến một từ điển thành XML:

Python3

$ pip install dict2xml
0
$ pip install dict2xml
1
$ pip install dict2xml
2
$ pip install dict2xml
3

$ pip install dict2xml
4
$ pip install dict2xml
5

$ pip install dict2xml
6
$ pip install dict2xml
7
$ pip install dict2xml
8
$ pip install dict2xml
9

$ pip install dict2xml
6
2

  as
  True

7
1
2

  as
  True

7
22____23
2

  as
  True

7
4

2

  as
  True

7
5
2

  as
  True

7
6
$ pip install dict2xml
8
2

  as
  True

7
8

2

  as
  True

7
5

   2
   
      as
      True
   
   7
03018

   2
   
      as
      True
   
   7
2

   2
   
      as
      True
   
   7
3

2

  as
  True

7
5

   2
   
      as
      True
   
   7
5

$ pip install dict2xml
6

   2
   
      as
      True
   
   7
7

   2
   
      as
      True
   
   7
8


   2
   
      as
      True
   
   7
9
$ pip install dict2xml
8
 $ pip install dicttoxml 
1
 $ pip install dicttoxml 
2
 $ pip install dicttoxml 
3
 $ pip install dicttoxml 
4
 $ pip install dicttoxml 
5

Các

 $ easy_install dicttoxml  
5
$ pip install dict2xml
8
 $ easy_install dicttoxml  
7
 $ easy_install dicttoxml  
8
 $ easy_install dicttoxml  
9


    2
    
        as
        True
    
    7
0

    2
    
        as
        True
    
    7
1


    2
    
        as
        True
    
    7
0

    2
    
        as
        True
    
    7
3


    2
    
        as
        True
    
    7
4

    2
    
        as
        True
    
    7
5

    2
    
        as
        True
    
    7
6

    2
    
        as
        True
    
    7
7
 $ pip install dicttoxml 
5

    2
    
        as
        True
    
    7
9

    2
    
        as
        True
    
    7
0


    2
    
        as
        True
    
    7
0

    2
    
        as
        True
    
    7
3

Output:  

& nbsp;
b'geeksforgeeksnoida920’ 
b'geeksforgeeksnoida920’ 
 


XML là ngôn ngữ đánh dấu được thiết kế để vận chuyển dữ liệu. Nó đã được thực hiện trong khi giữ cho nó tự mô tả trong tâm trí. Cú pháp của XML tương tự như HTML khác với thực tế là các thẻ trong XML aren đã được xác định trước. Điều này cho phép dữ liệu được lưu trữ giữa các thẻ tùy chỉnh trong đó thẻ chứa chi tiết về dữ liệu và dữ liệu được lưu trữ ở giữa các thẻ mở và đóng. is a markup language that is designed to transport data. It was made while keeping it self descriptive in mind. Syntax of XML is similar to HTML other than the fact that the tags in XML aren’t pre-defined. This allows for data to be stored between custom tags where the tag contains details about the data and the data is stored in between the opening and closing tags.

Lưu ý: Bạn có thể đọc thêm về XML tại đây: XML | Khái niệm cơ bản và XML | Cú pháp You can read more about XML here: XML | Basics and XML | Syntax

Hiện tại, có hai mô -đun chính cho phép tuần tự hóa từ điển Python thành XML. Họ là & nbsp;

  1. dict2xml
  2. DictOxml

Sử dụng Dict2XML

Để chuyển đổi nhanh từ điển Python sang XML, bạn có thể sử dụng Dict2XML. Cài đặt nó bằng cách sử dụng: & nbsp; & nbsp;

$ pip install dict2xml

Bây giờ giả sử bạn có một từ điển có tên dữ liệu trong Python mà bạn muốn chuyển đổi sang XML & NBSP; & NBSP;

Python3

$ pip install dict2xml
0

    2
    
        as
        True
    
    7
4
$ pip install dict2xml
2

    2
    
        as
        True
    
    7
6


    2
    
        as
        True
    
    7
7
$ pip install dict2xml
8

    2
    
        as
        True
    
    7
9

    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
0
 $ pip install dicttoxml 
3

    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
2
 $ pip install dicttoxml 
5

2

  as
  True

7
5

    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
5

    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
6


    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
7

    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
8
 $ pip install dicttoxml 
3

    
        Jan
        Feb
        Mar
        Apr
        May
        Jun
        Jul
        Aug
        Sep
        Oct
        Nov
        Dec
    
0
 $ pip install dicttoxml 
5


    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
7

    
        Jan
        Feb
        Mar
        Apr
        May
        Jun
        Jul
        Aug
        Sep
        Oct
        Nov
        Dec
    
3
 $ pip install dicttoxml 
3

    
        Jan
        Feb
        Mar
        Apr
        May
        Jun
        Jul
        Aug
        Sep
        Oct
        Nov
        Dec
    
5

    
        Jan
        Feb
        Mar
        Apr
        May
        Jun
        Jul
        Aug
        Sep
        Oct
        Nov
        Dec
    
6

2

  as
  True

7
5

    
        Jan
        Feb
        Mar
        Apr
        May
        Jun
        Jul
        Aug
        Sep
        Oct
        Nov
        Dec
    
8
 $ pip install dicttoxml 
3
$ pip install dict2xml
00
 $ pip install dicttoxml 
5

2

  as
  True

7
5
 $ easy_install dicttoxml  
4

$ pip install dict2xml
04
$ pip install dict2xml
8
$ pip install dict2xml
06


    2
    
        as
        True
    
    7
0
$ pip install dict2xml
08

Output:

2

  as
  True

7

Bao quanh một phần tử gốc và thụt lề tùy chỉnh & nbsp; giả sử bạn muốn bao bọc câu trả lời xung quanh một phần tử gốc và thêm thụt vào 3 khoảng trống. & Nbsp; 
Suppose you want to wrap the answer around a root element and add indent of 3 spaces. 

Python3

$ pip install dict2xml
0

    2
    
        as
        True
    
    7
4
$ pip install dict2xml
2

    2
    
        as
        True
    
    7
6


    2
    
        as
        True
    
    7
7
$ pip install dict2xml
8

    2
    
        as
        True
    
    7
9

    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
0
 $ pip install dicttoxml 
3

    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
2
 $ pip install dicttoxml 
5

2

  as
  True

7
5

    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
5

    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
6


    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
7

    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
8
 $ pip install dicttoxml 
3

    
        Jan
        Feb
        Mar
        Apr
        May
        Jun
        Jul
        Aug
        Sep
        Oct
        Nov
        Dec
    
0
 $ pip install dicttoxml 
5


    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
7

    
        Jan
        Feb
        Mar
        Apr
        May
        Jun
        Jul
        Aug
        Sep
        Oct
        Nov
        Dec
    
3
 $ pip install dicttoxml 
3

    
        Jan
        Feb
        Mar
        Apr
        May
        Jun
        Jul
        Aug
        Sep
        Oct
        Nov
        Dec
    
5

    
        Jan
        Feb
        Mar
        Apr
        May
        Jun
        Jul
        Aug
        Sep
        Oct
        Nov
        Dec
    
6

2

  as
  True

7
5

    
        Jan
        Feb
        Mar
        Apr
        May
        Jun
        Jul
        Aug
        Sep
        Oct
        Nov
        Dec
    
8
 $ pip install dicttoxml 
3
$ pip install dict2xml
00
 $ pip install dicttoxml 
5

2

  as
  True

7
5
 $ easy_install dicttoxml  
4

$ pip install dict2xml
04
$ pip install dict2xml
8
$ pip install dict2xml
06


    2
    
        as
        True
    
    7
0
$ pip install dict2xml
08

Output:  


   2
   
      as
      True
   
   7

DictOxml

Sử dụng Dict2XML

 $ pip install dicttoxml 

or  

 $ easy_install dicttoxml  

Python3

Để chuyển đổi nhanh từ điển Python sang XML, bạn có thể sử dụng Dict2XML. Cài đặt nó bằng cách sử dụng: & nbsp; & nbsp;


    2
    
        as
        True
    
    7
7
$ pip install dict2xml
8

    2
    
        as
        True
    
    7
9

    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
0
 $ pip install dicttoxml 
3

    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
2
 $ pip install dicttoxml 
5

2

  as
  True

7
5

    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
5

    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
6


    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
7

    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
8
 $ pip install dicttoxml 
3

    
        Jan
        Feb
        Mar
        Apr
        May
        Jun
        Jul
        Aug
        Sep
        Oct
        Nov
        Dec
    
0
 $ pip install dicttoxml 
5


    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
7

    
        Jan
        Feb
        Mar
        Apr
        May
        Jun
        Jul
        Aug
        Sep
        Oct
        Nov
        Dec
    
3
 $ pip install dicttoxml 
3

    
        Jan
        Feb
        Mar
        Apr
        May
        Jun
        Jul
        Aug
        Sep
        Oct
        Nov
        Dec
    
5

    
        Jan
        Feb
        Mar
        Apr
        May
        Jun
        Jul
        Aug
        Sep
        Oct
        Nov
        Dec
    
6

2

  as
  True

7
5

    
        Jan
        Feb
        Mar
        Apr
        May
        Jun
        Jul
        Aug
        Sep
        Oct
        Nov
        Dec
    
8
 $ pip install dicttoxml 
3
$ pip install dict2xml
00
 $ pip install dicttoxml 
5

2

  as
  True

7
5
 $ easy_install dicttoxml  
4

$ pip install dict2xml
04
$ pip install dict2xml
8
$ pip install dict2xml
06


    2
    
        as
        True
    
    7
0
$ pip install dict2xml
08

Output:

Bao quanh một phần tử gốc và thụt lề tùy chỉnh & nbsp; giả sử bạn muốn bao bọc câu trả lời xung quanh một phần tử gốc và thêm thụt vào 3 khoảng trống. & Nbsp;

$ pip install dict2xml
04
$ pip install dict2xml
8
$ pip install dict2xml
42
$ pip install dict2xml
8
$ pip install dict2xml
44
$ pip install dict2xml
45
$ pip install dict2xml
8
$ pip install dict2xml
47

    2
    
        as
        True
    
    7
0
 
Lets pretty format the text so that we can read it clearly. Python already has an inbuilt package for this! 

Python3

$ pip install dict2xml
0
$ pip install dict2xml
88
$ pip install dict2xml
2
$ pip install dict2xml
90

Để chuyển đổi nhanh từ điển Python sang XML, bạn có thể sử dụng Dict2XML. Cài đặt nó bằng cách sử dụng: & nbsp; & nbsp;


    2
    
        as
        True
    
    7
7
$ pip install dict2xml
8

    2
    
        as
        True
    
    7
9

    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
0
 $ pip install dicttoxml 
3

    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
2
 $ pip install dicttoxml 
5

2

  as
  True

7
5

    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
5

    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
6


    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
7

    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
8
 $ pip install dicttoxml 
3

    
        Jan
        Feb
        Mar
        Apr
        May
        Jun
        Jul
        Aug
        Sep
        Oct
        Nov
        Dec
    
0
 $ pip install dicttoxml 
5


    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
7

    
        Jan
        Feb
        Mar
        Apr
        May
        Jun
        Jul
        Aug
        Sep
        Oct
        Nov
        Dec
    
3
 $ pip install dicttoxml 
3

    
        Jan
        Feb
        Mar
        Apr
        May
        Jun
        Jul
        Aug
        Sep
        Oct
        Nov
        Dec
    
5

    
        Jan
        Feb
        Mar
        Apr
        May
        Jun
        Jul
        Aug
        Sep
        Oct
        Nov
        Dec
    
6

2

  as
  True

7
5

    
        Jan
        Feb
        Mar
        Apr
        May
        Jun
        Jul
        Aug
        Sep
        Oct
        Nov
        Dec
    
8
 $ pip install dicttoxml 
3
$ pip install dict2xml
00
 $ pip install dicttoxml 
5

2

  as
  True

7
5
 $ easy_install dicttoxml  
4

$ pip install dict2xml
04
$ pip install dict2xml
8
$ pip install dict2xml
06

Bao quanh một phần tử gốc và thụt lề tùy chỉnh & nbsp; giả sử bạn muốn bao bọc câu trả lời xung quanh một phần tử gốc và thêm thụt vào 3 khoảng trống. & Nbsp;


    2
    
        as
        True
    
    7
0
2

  as
  True

7
29

Output: 


    2
    
        as
        True
    
    7

$ pip install dict2xml
04
$ pip install dict2xml
8
$ pip install dict2xml
42
$ pip install dict2xml
8
$ pip install dict2xml
44
$ pip install dict2xml
45
$ pip install dict2xml
8
$ pip install dict2xml
47

    2
    
        as
        True
    
    7
0

You might notice that the tags now contain attributes like type=”int”/”dict”/”str” which can be turned off using attr_type=False 

Python3

$ pip install dict2xml
0
$ pip install dict2xml
88
$ pip install dict2xml
2
$ pip install dict2xml
90

Dict2xml là tốt nhưng nó không có nhiều tùy chọn để chỉ định cách tôi muốn XML của mình được định dạng hoặc thêm các thuộc tính trong các thẻ. DictTOXML có thể được sử dụng cho các mục đích này. Nó cũng hoạt động hoàn hảo trên các đối tượng giống như dict và có thể lặp lại. Cài đặt nó thông qua dấu nhắc thiết bị đầu cuối hoặc lệnh bằng cách nhập: & nbsp; & nbsp;


    2
    
        as
        True
    
    7
0
2

  as
  True

7
41

Output: 


    2
    
        as
        True
    
    7

$ pip install dict2xml
0
$ pip install dict2xml
52
$ pip install dict2xml
2
$ pip install dict2xml
54

At times you might need to save XML to a file which can be done as follows

Python3

Để chuyển đổi nhanh từ điển Python sang XML, bạn có thể sử dụng Dict2XML. Cài đặt nó bằng cách sử dụng: & nbsp; & nbsp;

$ pip install dict2xml
0
$ pip install dict2xml
88
$ pip install dict2xml
2
$ pip install dict2xml
90

$ pip install dict2xml
04
$ pip install dict2xml
8
$ pip install dict2xml
06

Bao quanh một phần tử gốc và thụt lề tùy chỉnh & nbsp; giả sử bạn muốn bao bọc câu trả lời xung quanh một phần tử gốc và thêm thụt vào 3 khoảng trống. & Nbsp;

$ pip install dict2xml
04
$ pip install dict2xml
8
$ pip install dict2xml
42
$ pip install dict2xml
8
$ pip install dict2xml
44
$ pip install dict2xml
45
$ pip install dict2xml
8
$ pip install dict2xml
47

    2
    
        as
        True
    
    7
0

2

  as
  True

7
64

2

  as
  True

7
65

Output: 
 

Hướng dẫn dict to xml python - dict sang xml python

Dict2xml là tốt nhưng nó không có nhiều tùy chọn để chỉ định cách tôi muốn XML của mình được định dạng hoặc thêm các thuộc tính trong các thẻ. DictTOXML có thể được sử dụng cho các mục đích này. Nó cũng hoạt động hoàn hảo trên các đối tượng giống như dict và có thể lặp lại. Cài đặt nó thông qua dấu nhắc thiết bị đầu cuối hoặc lệnh bằng cách nhập: & nbsp; & nbsp;
If you don’t want item elements in a list to be called ‘item’, you can specify the element name using a function that takes the parent element name (i.e. the list name) as an argument. 

Python3

$ pip install dict2xml
0
$ pip install dict2xml
52
$ pip install dict2xml
2
$ pip install dict2xml
54

$ pip install dict2xml
0
$ pip install dict2xml
88
$ pip install dict2xml
2
$ pip install dict2xml
90

2

  as
  True

7
74
$ pip install dict2xml
8

    2
    
        as
        True
    
    7
9
2

  as
  True

7
77 ____278
2

  as
  True

7
79
2

  as
  True

7
80
2

  as
  True

7
81
2

  as
  True

7
80
2

  as
  True

7
83
2

  as
  True

7
84

2

  as
  True

7
85
2

  as
  True

7
86

    
        foo
        bar
        baz
    
    
        bar
        1
    
    True
6

2

  as
  True

7
88
2

  as
  True

7
79
2

  as
  True

7
90
2

  as
  True

7
81
 $ pip install dicttoxml 
5

2

  as
  True

7
88
2

  as
  True

7
83
 $ pip install dicttoxml 
3
2

  as
  True

7
96

    
        Jan
        Feb
        Mar
        Apr
        May
        Jun
        Jul
        Aug
        Sep
        Oct
        Nov
        Dec
    
6

2

  as
  True

7
85
2

  as
  True

7
99
 $ pip install dicttoxml 
3

    
        Jan
        Feb
        Mar
        Apr
        May
        Jun
        Jul
        Aug
        Sep
        Oct
        Nov
        Dec
    
5
 $ easy_install dicttoxml  
4


   2
   
      as
      True
   
   7
03
$ pip install dict2xml
8

   2
   
      as
      True
   
   7
05

   2
   
      as
      True
   
   7
06

   2
   
      as
      True
   
   7
07

$ pip install dict2xml
04
$ pip install dict2xml
8

   2
   
      as
      True
   
   7
10
$ pip install dict2xml
8

   2
   
      as
      True
   
   7
12


   2
   
      as
      True
   
   7
13
$ pip install dict2xml
8

   2
   
      as
      True
   
   7
15


    2
    
        as
        True
    
    7
0

   2
   
      as
      True
   
   7
17

Output: 


    
        foo
        bar
        baz
    
    
        bar
        1
    
    True

Lợi ích của việc lấy tên phần tử cha làm đối số là bạn có thể viết hàm để làm điều gì đó với nó.Hãy nói rằng bạn có một đối tượng với một số danh sách các mục cụ thể: & nbsp;

Python3

$ pip install dict2xml
0
$ pip install dict2xml
52
$ pip install dict2xml
2
$ pip install dict2xml
54

$ pip install dict2xml
0
$ pip install dict2xml
88
$ pip install dict2xml
2
$ pip install dict2xml
90

2

  as
  True

7
74
$ pip install dict2xml
8

    2
    
        as
        True
    
    7
9
2

  as
  True

7
77 ____278
2

  as
  True

7
79
2

  as
  True

7
80
2

  as
  True

7
81
2

  as
  True

7
80
2

  as
  True

7
83
2

  as
  True

7
84

$ pip install dict2xml
6

   2
   
      as
      True
   
   7
30

   2
   
      as
      True
   
   7
31

   2
   
      as
      True
   
   7
32
 $ easy_install dicttoxml  
0

   2
   
      as
      True
   
   7
34
 $ pip install dicttoxml 
5


   2
   
      as
      True
   
   7
36

   2
   
      as
      True
   
   7
37
 $ easy_install dicttoxml  
0

   2
   
      as
      True
   
   7
39
 $ pip install dicttoxml 
5


   2
   
      as
      True
   
   7
36

   2
   
      as
      True
   
   7
42
 $ easy_install dicttoxml  
0

   2
   
      as
      True
   
   7
44
 $ pip install dicttoxml 
5


   2
   
      as
      True
   
   7
36

   2
   
      as
      True
   
   7
47
 $ easy_install dicttoxml  
0

   2
   
      as
      True
   
   7
49
 $ pip install dicttoxml 
5


   2
   
      as
      True
   
   7
36

   2
   
      as
      True
   
   7
52
 $ easy_install dicttoxml  
0

   2
   
      as
      True
   
   7
54
 $ pip install dicttoxml 
5


   2
   
      as
      True
   
   7
36

   2
   
      as
      True
   
   7
57
 $ easy_install dicttoxml  
0

   2
   
      as
      True
   
   7
59

   2
   
      as
      True
   
   7
60

2

  as
  True

7
85
 $ easy_install dicttoxml  
4

2

  as
  True

7
88
2

  as
  True

7
83
 $ pip install dicttoxml 
3
2

  as
  True

7
96

    
        Jan
        Feb
        Mar
        Apr
        May
        Jun
        Jul
        Aug
        Sep
        Oct
        Nov
        Dec
    
6


   2
   
      as
      True
   
   7
03
$ pip install dict2xml
8

   2
   
      as
      True
   
   7
05

   2
   
      as
      True
   
   7
06

   2
   
      as
      True
   
   7
07


    2
    
        as
        True
    
    7
0
2

  as
  True

7
41

Output: 


    
        Jan
        Feb
        Mar
        Apr
        May
        Jun
        Jul
        Aug
        Sep
        Oct
        Nov
        Dec