[jdom-interest] Can 2 Xml documents be parsed in a same.......

Jason Hunter jhunter at collab.net
Thu Jan 11 02:22:17 PST 2001


>  is it possible to parse 2 Xml documents in the same program..

Answer's yes, but you should read the JavaWorld articles about JDOM. 
Your code below isn't even JDOM code.  

-jh-

>    DOMParser parser = new DOMParser();
> 
>    DOMParser parser1 = new DOMParser();
> 
>    parser1.parse("c://course.xml");
> 
> 
>   // Generate a URL from the filename.
>   URL url = createURL(argv[0]);
> 
>          // Set various parser options: validation on,
>          // warnings shown, error stream set to stderr.
>          parser.setErrorStream(System.err);
>          parser.setValidationMode(true);
>          parser.showWarnings(false);
> 
>   // Parse the document.
>          parser.parse(url);
> 
>          // Obtain the document.
>          XMLDocument doc = parser.getDocument();
>          XMLDocument doc1 = parser.getDocument();
> thx...
> Anoop



More information about the jdom-interest mailing list