The Artima Developer Community
Sponsored Link

Python Answers Forum
python with libxml2

2 replies on 1 page. Most recent reply: Oct 20, 2008 9:08 AM by ndoe ganteng

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
ankit rastogi

Posts: 1
Nickname: ferrari
Registered: Dec, 2005

python with libxml2 Posted: Dec 20, 2005 6:13 AM
Reply to this message Reply
Advertisement
I am new to xml and python. I want to parse a xml document
in python using libxml2.
But I cant find any book which talks about xml processing using libxml2. All almost talks with pyxml.
Please let me know some books availaible in market.
OR if anyone has some pdfs or links where I can get the same then please send me.


Chad Gorshing

Posts: 12
Nickname: gorshing
Registered: Jun, 2004

Re: python with libxml2 Posted: Jan 16, 2006 6:46 PM
Reply to this message Reply
The following two links were useful to me. Let me know if you have any more questions.

http://xmlsoft.org/xmlreader.html
http://xmlsoft.org/XSLT/python.html

ndoe ganteng

Posts: 3
Nickname: ndoe
Registered: Oct, 2008

Re: python with libxml2 Posted: Oct 20, 2008 9:08 AM
Reply to this message Reply
hello all iam newbie for creating file in python and i have task for my collage can you all help me the task like this
i have file name for that file is example.txt and content of file like this
elementary
30802160
1
15518
30802170
2
15530
juniorhigh
30802180
1
15518
3 0802190
2
15530
seniorhigh
30802200
1
15518
30802210
2
15530

and i want to convert to example.xml with content like this<object>
<school province = "bali" object_id = "00009876">
<list school="base" >
<object_ref name = "1"> 30802160</object_ref>
<object_ref name = "2"> 30802170</object_ref>
<object_ref name = "3"> 30802180</object_ref>
<object_ref name = "4"> 30802190</object_ref>
<object_ref name = "5"> 30802200</object_ref>
<object_ref name = "6"> 30802210</object_ref>
</list>
<object classname = "elementary" object_id = " 30802160">
<integer name = "Sid">1</integer>
<integer name = "Address">15518</integer>
</object>
<object classname = "elementary" object_id = " 30802170">
<integer name = "Sid">2</integer>
<integer name = "Address">15530</integer>
</object>
<object classname = "juniorhigh" object_id = " 30802180">
<integer name = "Sid">1</integer>
<integer name = "Address">15518</integer>
</object>
<object classname = "juniorhigh" object_id = " 30802190">
<integer name = "Sid">2</integer>
<integer name = "Address">15530</integer>
</object>
<object classname = "seniorhigh" object_id = " 30802200">
<integer name = "Sid">1</integer>
<integer name = "Address">15518</integer>
</object>
<object classname = "seniorhigh" object_id = " 30802210">
<integer name = "Sid">2</integer>
<integer name = "Address">15530</integer>
</object>
</school>
</object>

thanks for your help

Flat View: This topic has 2 replies on 1 page
Topic: low child in xml Previous Topic   Next Topic Topic: Pylinda

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use