Re: XMLParserBuffer returns no element found!!!

Michael B Allen <[email protected]>
Newsgroups gmane.text.xml.expat.general
Message-ID <[email protected]>
On Wed, 23 Aug 2006 07:27:50 +0530
[email protected] 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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.