David,
I've tried first with an empty file and the doc is not null. Let's say for
this situation, I can call getDocumentElement that will be null, so it can be
tested. The problems arise when is not well-formed. Taking this small file:
<?xml version="1.0" encoding="UTF-8"?>
<tag>tag
<name>Name</NAME>
after I parsed and I've counted the number of elements, the result was 2, and
this I don't like at all.
And Jordan, please excuse me that I've replied to this mail instead of sending
a new one, but I'm interested in this too.
Thanks,
Cip
"Adams, David" wrote:
> I'd check to see if it exists before I even try to parse it. Just use some
> standard 'C' call such as '_access("me.xml", 0)'. If it does exists and
> simply isn't well-formed, I do not know off-hand if an exception is thrown
> or a error-handler called. I would think it would since the inital doc
> declaration would be invalid. You might try creating an empty file and
> seeing how the DOMParser handles it.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]