473,511 Members | 12,747 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML documentation stinks - help?

I'm sure this must be a PEP, but could someone look at the PyXML
documentation?

I'm trying to evaluate XML on Python (to eventually use it with
XML-RPC) as apposed to Perl.

The problem is, I can't find a simple demo or documentation that just
says how to create a parser object, and call the start/char/end event
handlers.

With Perl's XML::Parser, it's that simple, you overload a
start/char/end handler that gets called for every element, then you
just create a hash of the data or whatever you want.

Most of the sites I Googled don't even exist anymore or have either
incomplete documentation, out-of-date documentation, or have way
over-complex examples that don't even explain why their importing
modules or what they're doing.

Maybe I'm missing something, but even comp.lang.python.* seems to have
no topics on XML in the past 3 years or so - has XML been deprecated
and I've not heard about it yet?! ;o)

I never thought I'd see something that is easy to do in Perl, but
seemingly impossible to do in Python, I guess Perl is optimised for
text parsing....

Jul 18 '05 #1
2 1811
Simon John wrote:
I'm sure this must be a PEP, but could someone look at the PyXML
documentation?

I'm trying to evaluate XML on Python (to eventually use it with
XML-RPC) as apposed to Perl.

The problem is, I can't find a simple demo or documentation that just
says how to create a parser object, and call the start/char/end event
handlers.

With Perl's XML::Parser, it's that simple, you overload a
start/char/end handler that gets called for every element, then you
just create a hash of the data or whatever you want.

Most of the sites I Googled don't even exist anymore or have either
incomplete documentation, out-of-date documentation, or have way
over-complex examples that don't even explain why their importing
modules or what they're doing.


Did the Python/XML HOWTO not meet your needs?

http://pyxml.sourceforge.net/topics/...xml-howto.html

Note Chapter 5 on the SAX API, which looks like what you describe. It
seems to be fairly straightforward to me.

--
Robert Kern
rk***@ucsd.edu

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
Jul 18 '05 #2

Simon> I'm trying to evaluate XML on Python (to eventually use it with
Simon> XML-RPC) as apposed to Perl.

There is no need that I'm aware of to understand how Python deals with XML
to use XML-RPC. There is already an xmlrpclib module that hides all XML
details from its users, though to speed things up a bit I urge you to
install Fredrik Lundh's sgmlop module if you decide to use xmlrpclib. Maybe
if you can describe what you mean by "use it with XML-RPC" we can help you
avoid XML nitty gritty altogether.

Simon> Maybe I'm missing something, but even comp.lang.python.* seems to
Simon> have no topics on XML in the past 3 years or so - has XML been
Simon> deprecated and I've not heard about it yet?! ;o)

XML is no panacea. I'm sure most of the denizens of c.l.py realize that and
keep their distance when they can. ;-)

Skip
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1360
by: TDM | last post by:
Hello all, I suspect I created my own problem as I had a need to install an older version of MSDN Library so now my .NET Documentation is broken. When I run : Start/All Programs/Microsoft...
4
1890
by: PaulThomas | last post by:
WHY does the .Net Documentation show http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebsessionstatehttpsessionstatememberstopic.asp .NET Framework Class...
354
15496
by: Montrose... | last post by:
After working in c# for a year, the only conclusion I can come to is that I wish I knew c. All I need is Linux, the gnu c compiler and I can do anything. Web services are just open sockets...
12
2855
by: Fredrik Olsson | last post by:
Hello. For Java there is javadac, for Obj-C headerdoc2html, for C doxygen, and even for good old VB 6 there is VBDox. But I have found no suitable tool for documenting my .net code to get...
7
1581
by: egoebel | last post by:
Hi, I would like to have a decent set of HTML docs for the entire Standard C++ Library, as opposed to STL-only docs like the pages at SGI. I've been using the MSDN docs but,...ugh...I'm sure I...
26
1982
by: Jeff_Relf | last post by:
Hi Olaf_Baeyens ( and Linonut ), Microsoft C++ is really it's latest version of MS_C, as Microsoft is not supporting the latest C standard, C99. cout and the STL are pure garbage and should...
97
4286
by: Cameron Laird | last post by:
QOTW: "Python makes it easy to implement algorithms." - casevh "Most of the discussion of immutables here seems to be caused by newcomers wanting to copy an idiom from another language which...
0
7148
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7430
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7089
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5673
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5072
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3217
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
790
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.