[Expat-discuss] XMLParserBuffer returns no element found!!!
Michael B Allen
mba2000 at ioplex.com
Wed Aug 23 15:16:19 CEST 2006
On Wed, 23 Aug 2006 07:27:50 +0530
Shishir.Rawat at rds.co.nz wrote:
You're changing to the root directory:
> /* Change the current working directory */
> if ((chdir("/")) < 0) {
> /* Log the failure */
> exit(EXIT_FAILURE);
> }
>
> /* Close out the standard file descriptors */
> close(STDIN_FILENO);
> close(STDOUT_FILENO);
MMSG et al write to stderr by default. See the msgno HTML documentation
on the libmba website for instructions on how to write the code necessary
for msgno macros to write to syslog.
For now, don't close stderr so you can see the error.
// close(STDERR_FILENO);
> #endif
>
Now you try to load a file in the current directory.
> if (DOM_DocumentLS_load(doc, "xmlfile.xml") == -1) {
> MMSG("test xmlfile.xml load failed DOM_Exception");
> syslog(LOG_USER | LOG_DEBUG, "Error trying to load XML file \n");
> return 0;
> }
If you comment out close(STDERR_FILENO) you'll see the error:
src/expatls.c:693:DOM_DocumentLS_load: No such file or directory: uri=xmlfile.xml
You need to use a full pathname.
Mike
--
Michael B Allen
PHP Active Directory SSO
http://www.ioplex.com/
More information about the Expat-discuss
mailing list