Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/01/2011, 06:59
adat21
 
Fecha de Ingreso: enero-2011
Ubicación: Barcelona
Mensajes: 9
Antigüedad: 13 años, 3 meses
Puntos: 0
Mensaje Error con Conversor XSL

Como puedo hacer para que no me de este error?

conversor.xsl:1: parser error : XML declaration allowed only at the start of the document
<?xml version="1.0"?>
^
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home_1/f/f3294242/Projecte2/tasca13.py", line 11, in <module>
print llegir_conversor('conversor.xsl')
File "/home_1/f/f3294242/Projecte2/tasca13.py", line 7, in llegir_conversor
doc= libxml2.parseFile(conversor)
File "/var/lib/python-support/python2.5/libxml2.py", line 1279, in parseFile
if ret is None:raise parserError('xmlParseFile() failed')
libxml2.parserError: xmlParseFile() failed


Código PHP:
import libxml2 

def llegir_conversor
(conversor):
    
doclibxml2.parseFile(conversor)
    
alibxml2.parseStylesheetDoc(doc)
    
blibxml2.applyStylesheet(a)
    print 
b
print llegir_conversor('conversor.xsl'