Re: [xml] xmlReadFile Fails Where xmlParseFile Succeeds

2015-10-16 Thread Daniel Veillard
On Mon, Jul 27, 2015 at 02:38:23PM -0400, Paul Braman wrote: > The following bit of code fails > > xmlInitParser(); > xmlDocPtr maindoc = xmlReadFile("maindoc.xml", NULL, 0); > xmlDocPtr subdoc = xmlReadFile("subdoc.xml", NULL, 0); > xmlNodePtr content = xmlDocGetRootElement(subdoc); > xmlUnlinkNo

[xml] xmlReadFile Fails Where xmlParseFile Succeeds

2015-07-27 Thread Paul Braman
The following bit of code fails xmlInitParser(); xmlDocPtr maindoc = xmlReadFile("maindoc.xml", NULL, 0); xmlDocPtr subdoc = xmlReadFile("subdoc.xml", NULL, 0); xmlNodePtr content = xmlDocGetRootElement(subdoc); xmlUnlinkNode(content); xmlAddChild(xmlDocGetRootElement(maindoc), content); xmlFreeDo