Re: [xml] Parsing an in-memory DTD?

2005-05-24 Thread Daniel Veillard
On Mon, May 23, 2005 at 11:30:53PM +0200, Anne Martens wrote: There comes my question: Is there any way to parse a DTD from an in-memory string? I think yes. Using xmlIOParseDTD() with a NULL SAX handler, and an xmlParserInputBufferPtr built from your in-memory string. Daniel -- Daniel

[xml] isoLat1toUTF8 conv error

2005-05-24 Thread Remy HAREL
Hi list, Still on my encodings problems, in fact, I want to translate a const char* named texte which contains a text encoded in iso-latin-1 ( iso-8859-1 exactly ) to UTF8, because of the libxml2 api wants it. So I use isolat1ToUTF8 : unsigned char* texte_tmp = NULL; int outlen=0,

Re: [xml] isoLat1toUTF8 conv error

2005-05-24 Thread Daniel Veillard
On Tue, May 24, 2005 at 12:20:52PM +0200, Remy HAREL wrote: ... isolat1ToUTF8(texte_tmp, outlen, ( const unsigned char*)texte, inlen); ... Not checking the value returned by the function, bad :-( Incomplete non-compilable code, bad :-( And outlen and inlen are both IN and OUT

Re: [xml] isoLat1toUTF8 conv error

2005-05-24 Thread William M. Brack
Daniel Veillard said: On Tue, May 24, 2005 at 12:20:52PM +0200, Remy HAREL wrote: ... isolat1ToUTF8(texte_tmp, outlen, ( const unsigned char*)texte, inlen); ... Not checking the value returned by the function, bad :-( Incomplete non-compilable code, bad :-( And outlen and inlen

[xml] how do I...

2005-05-24 Thread Sebastian Kuzminsky
Hi folks, I'm a bit of an XML noob with a how-to question. I've got a couple of processes that trade XML messages over the network. The sender writes each XML message on a single newline-terminated line. The receiver uses select and read, and reads until it gets a '\n', then passes the line to

Re: [xml] how do I...

2005-05-24 Thread Daniel Veillard
On Tue, May 24, 2005 at 02:47:12PM -0600, Sebastian Kuzminsky wrote: I've got a couple of processes that trade XML messages over the network. The sender writes each XML message on a single newline-terminated line. The receiver uses select and read, and reads until it gets a '\n', then passes

Re: [xml] how do I...

2005-05-24 Thread Daniel Veillard
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