Dear all,

        I actually have this question for long. Please have a look at the following
code (only several lines):

        DOM_Document doc; DOM_Element root;
        DOM_Node node, child;
        DOM_NodeList list; DOMParser parser;

        // Parse the license with XML4C
        parser.parse(path); //path is the name and location of the file
        doc = parser.getDocument();
        root = doc.getDocumentElement();
        list = root.getElementsByTagName("WORK");

        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
wonder, IF THERE IS A WAY TO CHECK THE EXISTENCE OF THE FILE BEFORE PARSING
IT? I tried to set a check at "doc", like "if (doc == NULL)..." but it
doesn't do anything at all...

        Please help. Thousand thanks.


Best regards,
--------------------------------------------
Jordan Cheun Ngen, Chong
INF-4067 Universiteit Twente
Postbus 217
7500 AE Enschede
The Netherlands

Distributed and Embedded Systems (DIES)
--------------------------------------------
Office Phone: +31 53 4894655
Web site: http://www.cs.utwente.nl/~chong
Email Add.: [EMAIL PROTECTED]
============================================


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

Reply via email to