Re: [xml] Question about parent/child (python-libxml2)

On Tue, May 11, 2004 at 09:53:59AM +0200, Stïphane Bidoul wrote:
 I think it's all StÃphane Bidoul faults :-), he added support
for iterator at the Python level.

I plead not guilty, your honour :-)
According to the NEWS file (which BTW has some accents
problems on it was not me who implemented
the iterators...

   Dohh, apologies...

The accented char problem is the following:
gnome:~/XML/doc -> xmllint --noout news.html
gnome:~/XML/doc ->
  the file is declared as being ISO-8859-1, the accents are expressed
in that encoding, it's fine, but ...
gnome:~ -> telnet 80
Connected to
Escape character is '^]'.
GET /news.html HTTP/1.0
HTTP/1.1 200 OK
Date: Tue, 11 May 2004 12:52:21 GMT
Server: Apache/2.0.46 (Red Hat)
Last-Modified: Thu, 06 May 2004 18:56:34 GMT
ETag: "1934c5-eb9d-1a0ddc80"
Accept-Ranges: bytes
Content-Length: 60317
Connection: close
Content-Type: text/html; charset=UTF-8
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"..

  The XML spec says that the HTTP headers advertized encoding take precedence
over the instance declaration, this is IMHO the most broken part of the spec
but we are stuck with it at this point, web servers simply fail to provide
the right charsets, now I need to fix the Apache configuration...
 Since usually people have more trouble walking a tree in document
order than a simple linked list, his choice is probably what helps
Python users most, even if it's not obvious at a syntactic level
that the semantic recurses down the trees.

In python land, that would probably be deemed somewhat unpythonic...
Had I done it myself, I would have made node.children an iterator
for the node's children, and a different method to create a tree
walker iterator.

Anyway, now I suppose it's a documentation issue... ;-)

Daniel Veillard      | Red Hat Desktop team
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]