Re: elementtree ProcessingInstructions

Lars Marius Garshol <[email protected]>
Newsgroups gmane.comp.python.xml
Message-ID <[email protected]>
* Werner F. Bruhin
>
> I think that the following are considered ProcessingInstructions.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <?jaxfront version=1.60;time=2005-12-18 12:15:07.078;xsd=wineXML.xsd?>
>
> Am I correct?

Only about the second one. The first one is the XML declaration, and  
is not considered a processing instruction, despite being  
syntactically extremely similar.

> If yes how do I get them into file?

Well, that particular XML declaration is equivalent to not having  
one, since UTF-8 is the default encoding. If the system at the other  
end requires one, then either your MIME types need fixing, or the  
system at the other end is broken.

>     pi2 = et.ProcessingInstruction(("twcb version=% 
> s;xsd=wineXML.xsd") %
>                             (__version__.twcbVERSION_STRING))
>     doc.append(pi2) # append is not what I want/need

What's wrong with append here? Does it give the right result, or some  
problem?

--
Lars Marius Garshol, Ontopian               http://www.ontopia.net
+47 98 21 55 50                             http://www.garshol.priv.no


_______________________________________________
XML-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/xml-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.