Re: [xml] Read tree from FILE* ?

-----Original Message-----
From: Daniel Veillard [mailto:veillard redhat com] 
Sent: Sunday, April 22, 2007 9:56 PM
To: Trappel Martin
Cc: xml gnome org
Subject: Re: [xml] Read tree from FILE* ?

On Fri, Apr 20, 2007 at 11:32:18AM +0200, Trappel Martin wrote:

I successfully can use xmlDocFormatDump(FILE*, xmlDocPtr, 
int) to save 
my xml document tree to a file.

However, I seem unable to find out how to _read_ a document 
tree from 
a FILE*.
Is there an opposite funtion to xmlDocDump?

(The reason why I want to use FILE* is that I'm on windows and 
therefore my filenames are UTF-16 which I can't give to libxml. If 
there is another solution to this problem than via opening the file 
myself I would also take that one. :)

  And if your program and libxml2 happen to have been 
compiled with even slightly different flags, the library and 
your program will expect different version of FILE * 
structure and this will crash and burn. This is such a 
problem that basically I avoid this in API.
  You can certainly create what you need based on

Thanks for the pointer. Will certainly look into this.
(And, yes, already had a crach with FILE* ... That's why I recompiled
libxml2 to use the same lib as our app ... But you're probablby right when
you say one is better of not depending on this api :)

Any Windows users out there who'd share (some example code) how they get
around the windows-filenames issue?


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