Examples of using XML and Python? 
Author Message
 Examples of using XML and Python?

Has anyone got any simple examples of using python and XML? The plan is to
use XML as the data format for information files. These need to be able to
be read, for data extraction, and also written too for modification. I am
VERY new to this. Python is O.K. but I haven't got a clue about SAX, DOM
etc.

Many thanks.

Mark A.



Mon, 05 Jan 2004 21:50:55 GMT  
 Examples of using XML and Python?

Quote:

>Has anyone got any simple examples of using Python and XML? The plan is to

                        .
                        .
                        .
<URL: http://www.python.org/sigs/xml-sig/ >
<URL: http://www-106.ibm.com/developerworks/library/python1/ >
<URL: http://www-106.ibm.com/developerworks/xml/library/xml-matters1/ >
<URL: http://safari2.oreilly.com/table.asp?bookname=pythonwin32&snode=33 >
--


Business:  http://www.Phaseit.net
Personal:  http://starbase.neosoft.com/~claird/home.html



Mon, 05 Jan 2004 22:33:43 GMT  
 Examples of using XML and Python?


Quote:
> Has anyone got any simple examples of using Python and XML? The plan
> is to use XML as the data format for information files. These need to
> be able to be read, for data extraction, and also written too for
> modification.

"XMLtreeview" under "Cool Contribs" in the demo that is included
with wxPython shows how to ~read~ an XML doc into a tree
control. I can't evaluate this in comparison with what Cameron Laird
has already posted in response to your query; however,
XMLtreeview is a particularly easy-to-read example.


Tue, 06 Jan 2004 01:04:28 GMT  
 Examples of using XML and Python?

Quote:

> Has anyone got any simple examples of using Python and XML? The plan is to
> use XML as the data format for information files. These need to be able to
> be read, for data extraction, and also written too for modification. I am
> VERY new to this. Python is O.K. but I haven't got a clue about SAX, DOM
> etc.

I see other posts replying with useful links, so I won't try to compete
with those.  I have two points, however:

1. "Use XML as the data format for information files" seems incredibly
   redundant, or at least very vague. :)  Can you provide any more detail?
   This might let somebody provide more "targetted" examples.

2. We are using Python and XML extensively at my current employer.
   We use XML "as the data format for information files". :-)  Actually,
   I would say we just store various kinds of data as XML.  In this
   case, the output from a factory automation system is encoded in
   XML format for later analysis/conversion into other forms.  Printed
   reports are generated directly from the XML using FOP, which converts
   to PDF files.  We are going to add some statistical analysis
   capability as well, which will probably start by using the Python
   XML support to extract relevant data for processing, either by
   Python or by converting into spreadsheet data for processing elsewhere.

   The input data for the automation system is also stored as XML.
   In this case, it is extract using Python utilities from another
   format (Excel spreadsheets, I believe, in the current version), and
   converted to XML for consumption by the automation application.

--
----------------------
Peter Hansen, P.Eng.



Tue, 06 Jan 2004 09:56:39 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Examples of using XML and Python? (fwd)

2. Using CLOCC xml.lisp to print XML in XML format

3. Python code examples that _generate_ HTML/XML?

4. may any one post an example for xml which use method appendchild(xml)

5. Python XML parsing example

6. Tutorial: Python/XML development using 4Suite Part 4: Composition and updates

7. Article on using Python generators for XML and DOM processing

8. Python and XML development using the open source 4Suite toolkit

9. XML using standard Python modules

10. Validating XML-parser using XML Schema?

11. Anyone using CL-XML(a xml parser)?

12. Creating XML using Python

 

 
Powered by phpBB® Forum Software