cecilio ha scritto: > Thanks, Francesco, > >>> Any clue about where should I start looking in wxXml2? >> the problem is probably to understand how to do it in libxml2 (which api >> call in which order, etc) - then the wrapping should be easy (maybe just >> a matter of adding some functions to wxXml2Document)... > > Sorry, I wrote wxXml2 but I a was thinking on libxml2. As you know > libxml is a huge package and the documentation is not for starters. So > it is very difficult for me to know how to start. Any idea? ok, looked a bit deeper in this subject. Thanks to the comments I did put in wxXml2 sources (go me! ;)) you may be lucky: everything you need to do it "manually" is probably in wxXml2 already. Most probably there's a smarter way in libxml2 (see e.g. xmlLoadExternalEntity at http://xmlsoft.org/html/libxml-parser.html).
If you want to do it "by hand" I think the following _may_ work: 1) after loading your doc, you need wxXml2Document::GetDTD 2) inside your wxXml2DTD you'll find the wxXml2EntityDecl nodes 3) for each of those node you need to use the GetContent() function and if a valid filename is returned load it using wxXml2Document 4) parse your original tree and replace the wxXML2_ENTITY_REF_NODE with the root of the wxXml2Document loaded at step #3 ok, after all it may reveal that libxml2 API is much more optimized and faster to use ;) Francesco ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ wxCode-users mailing list wxCode-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxcode-users