"Jordan C N Chong" <[EMAIL PROTECTED]> writes:

> Now the problem is at the parser.parse(path). The "path" must be the
> full path of the file, if not, the application will crash at "root"
> and "list". 

I'm assuming that by 'full path' you mean fully qualified or absolute
path, i.e. '/home/jasons/foo.xml' vs relative path,
i.e. '../xml/foo.xml'?  It should accept either relative or absolute
paths. 

> I wonder, IF THERE IS A WAY TO CHECK THE EXISTENCE OF
> THE FILE BEFORE PARSING IT? 

See PlatformUtils.hpp, there are a number of file utility methods.

> I tried to set a check at "doc", like "if (doc == NULL)..." but it
> doesn't do anything at all...

You won't get a NULL pointer, you will get a DOM_Document that has a
null implementation object, you check that using the
DOM_Node::isNull() method.

  if (doc->isNull()) ...

or

  if (doc.isNull()) ...

for you reference fans.

jas.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to