Dear all,
I'm using pyxml to read an xml file from stdin, modify it a bit, and
write it out again to stdout. In the process a doctype is added
automatically. In the output a line is added. I'm using a
schema to validate my output, but it won't validate when the !DOCTYPE is
present, so I think I'd
Daniel Veillard wrote:
> Seriously, with respect to performances one of the trouble I have seen when
> doing a bit of profiling is that interning strings, i.e. the process of
> taking string coming from C and turning them into Python string objects,
> to be extremely costly, I don't know if it's
On Fri, Jan 14, 2005 at 11:43:04AM +0100, Fredrik Lundh wrote:
> Daniel Veillard wrote:
>
> > Seriously, with respect to performances one of the trouble I have seen when
> > doing a bit of profiling is that interning strings, i.e. the process of
> > taking string coming from C and turning them in
On Fri, 14/01/2005 11:39 +0100, Tim van Erven wrote:
> I'm using pyxml to read an xml file from stdin, modify it a bit, and
> write it out again to stdout. In the process a doctype is added
> automatically. In the output a line is added. I'm using a
> schema to validate my output, but it won't val
Tim van Erven wrote:
> And the output of my program looks like this, which won't validate:
>
>
>
> http://www.example.org/info";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://www.example.org/info someschema.xsd">
>
> This is some modified sample text.
>
Daniel Veillard wrote:
On Fri, Jan 14, 2005 at 11:43:04AM +0100, Fredrik Lundh wrote:
Daniel Veillard wrote:
Seriously, with respect to performances one of the trouble I have seen when
doing a bit of profiling is that interning strings, i.e. the process of
taking string coming from C and turning th
Instead of inventing something from scratch, I'd recommend an
existing, standard, flexible, free format, like NetCDF. It even
has Python bindings.
http://my.unidata.ucar.edu/content/software/netcdf/
If you must invent it yourself, use Python marshal format over
HTTP. Works fine.
XML is wonderful s
Tim van Erven <[EMAIL PROTECTED]> wrote:
In the process a doctype is added automatically.
Yeah, 4DOM will do that. A null doctype is added at parse-time, for some
reason.
You can throw the doctype node out after parsing or before printing:
if document.doctype is not None:
document.removeChi