[Tutor] Python and xml *creation*

Prasad, Ramit ramit.prasad at jpmorgan.com
Fri Oct 26 19:00:16 CEST 2012


Sander Sweers wrote:
> Hi List,
> 
> I am looking for resources on creating xml files in python. I have found some
> resources but they all are very basic. I find lots of resources online about
> parsing and searching in an xml file but not so much about creating them.
> 
> Do any of you know of good online resources? I found an o'reilly book [1] do
> you know if it is any good?
> 
> Many thank in advance,
> Sander
> [1] http://shop.oreilly.com/product/9780596001285.do


Based on the most recent comment (May 2010) I would probably
stick with online tutorials. 

"""Rating 3.0
Headline: XML tools have moved on
By: Kimo
from:Auckland NZ
About Me: Developer, Educator
Verified Reviewer

Pros
    Helpful examples
    Well-written
Cons
    Obsolete
Best Uses
    Intermediate

When I first bought this in 2005 it was very helpful, especially the examples using SAX.

However Frank Lundh has now written the Element Tree module which is much easier to use to parse and write XML in Python.
Bottom Line: No, I would not recommend this to a friend """

Here are some tutorials for Python and XML. Your mileage
will vary greatly depending on what you are trying to achieve.
In general, I mostly just Google what I need to know as it tends
to have more help / be updated more often than books.

http://www.blog.pythonlibrary.org/2012/06/06/parsing-xml-with-python-using-lxml-objectify/
http://wiki.python.org/moin/PythonXml
http://eli.thegreenplace.net/2012/03/15/processing-xml-in-python-with-elementtree/ 

I hope that helps you get started. Feel free to come
back when you have some code and need further help.

Ramit Prasad


This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  


More information about the Tutor mailing list