Re: [xml] how do I...



On Tue, May 24, 2005 at 04:24:55PM -0600, Sebastian Kuzminsky wrote:
My network format already includes an end-of-document marker which never
appears inside the document ('\n'), so I guess I'm standards-compliant,
if only by dumb luck.  :)

  Hum, the problem is that \n is perfectly legal within XML documents,
and quite common there. So it works because the kind of data don't
require it but it's not a good solution. You should still be able
to use other separators chars in markup and escape it to a numeric
character reference if really needed, but still this is very limited.
I assume your documents are short, in which case a stream of
  [(inti, documenti) *]  where inti == len(documenti)
would be quite easier to handle, as you can directly read the right number 
of bytes and then pass directly the complete buffer for a single pass
parsing.

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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