Re: [xml] xmlReaderForMemory question



Thank you very much Remy-

The examples have definitely got me going. However, I can't figure out how to identify what functions a given struct (like xmlDoc) provides.

Does xmlFreeDoc() free the char array that was used to create it as well? I'm definitely trying to figure this out on my own before hitting this list, but I've found nothing that really answers my question.
thx-

   Jeremy

Remy HAREL wrote:

_HI_ Jeremy,

Data are stored in the xmlDocPtr and you can do all that you want through this pointer.

Just look at the xml code examples on the website, parser.c ( or tree ) for example. There are very simple examples, but they provide the minimum to a quick start and it will show you how to procede in a few minutes.

 Regards,

Jeremy Enos wrote:

I want to provide a few separate functions which make up my xml interface.

read_file
validate
parse
free_mem

Because these are separate, they'll be called with an argument which is a pointer to some data structure that I've read from the file. Should I just hold this data as a char array, or is there a better way already built in? For example, if read_file returns an xmlTextReaderPtr pointer, I think I lose the ability to clean up the memory from the char array I read in. Unless xmlReaderForMemory does that as well on cleanup? The API document makes no mention of it. thanks again for helping a beginner- I hope to accelerate on this before long.

   Jeremy

_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml





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