RE: [xml] python, libxml2, namespaces, and locator

setDocumentLocator is in the TODO's for, indeed.
I don't remember why I did not implement it a that time. I'll look into it.
OTOH, now that libxml2 has a SAX2 interface that does namespaces
and validation, it's probably possible to rewrite drv_libxml2 on
top of it instead of using the XmlReader API.

-----Original Message-----
From: xml-admin gnome org [mailto:xml-admin gnome org]On Behalf Of Morgen
Sent: 20 December, 2003 01:05
To: xml gnome org
Subject: [xml] python, libxml2, namespaces, and locator

Under Python, I tried using libxml2 via the libxml2.SAXParseFile( ) 
method, but it calls only my StartElement( ) callback rather than 
StartElementNS( ).  Then I discovered the driver and got 
that to work like so... 

    self.parser = xml.sax.make_parser(["drv_libxml2"]) 
    self.parser.setFeature(xml.sax.handler.feature_namespaces, True) 

...except that it doesn't currently support setDocumentLocator. 

Is there a way to enable the namespaces and namespace_prefixes features 
while using SAXParseFile( ) (or createPushParser( ), or ... )? 

Much appreciated, 

xml mailing list, project page <>  
xml gnome org

<<attachment: winmail.dat>>

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