[PIPython] xml reader

Mariano Di Felice mardif
Mer 18 Maggio 2005 12:55:52 CEST


Salve a tutti.
Oggi propongo un gran bel quesito:

Ho una stringa xml, dove oltre ai normali tag, ce n'è uno 
<thumb></thumb> dove all'interno vi è il contenuto di un'immagine 
encodata in base64 ( per ovviare ai problemi di caratteri strani che 
potrebbero creare problemi con l'xml).
Ho provato a leggere questa stringa col modulo minidom standard, ma 
ottengo sempre l'errore:
not well-formed

Ho pensato che fosse un problema del minidom ( altrimenti perchè lo 
avrebbero chiamato mini dom??)
sto pensando di utilizzare il sax, ma ho sempre un maledetto errore del 
tipo:

ValueError: unknown url type: ?xml version="1.0"?><famiglie>

Questo è l'inizio del file xml:

<?xml version="1.0"?><famiglie></famiglia code="001"> etc etc

grazie in anticipo a chiunque sia interessato a risolvere sto quesito!!!

ciao

-- 

/\/\ariano Di Felice
Java PHP Python programmer
with MySQL, PostgreSql, SQLite and Oracle support
Linux Platform Developer
mariano.difelice a eprometeus.com
www.eprometeus.com
Tel. 0735 656881
Fax. 0735 656307
---------------------------------------------------------
NO ai brevetti software! http://www.nosoftwarepatents.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mardif.vcf
Type: text/x-vcard
Size: 263 bytes
Desc: not available
Url : http://list.zope.it/pipermail/python/attachments/20050518/2c0417ca/mardif.vcf


More information about the Python mailing list