Re: error in bulding a document from an xml file using SAX builder

jdomuser <[email protected]>
Newsgroups gmane.comp.java.jdom.general
Message-ID <[email protected]>
i dont know why, but once i deleted the setValidation and
setIgnoringElementContentWhitespace lines, it just worked with no error..


jdomuser wrote:
> 
> hello i m using new jdom1.1. I wanted to build a document from an existing
> xml file, by giving its string path to SAX builder's build method.
> 
> Document doc;
> String xmlfile = "c:\\tmp\\foo.xml";
> SAXBuilder builder = new SAXBuilder();
> builder.setValidation(true);
> builder.setIgnoringElementContentWhitespace(true);
>      try{       
>          doc = builder.build(new StringReader(xmlfile));           
>      } catch (JDOMException e) {  
>           System.out.println("Error in building JDOM file");
>      } catch (IOException e) {
>           System.out.println("Error in building JDOM file");
>      }
> 
> unfortunately, i got a JDOMException here. what do you think about the
> reason?
> 
> regards.
> 

-- 
View this message in context: http://www.nabble.com/error-in-bulding-a-document-from-an-xml-file-using-SAX-builder-tp19226715p19233191.html
Sent from the JDOM - General mailing list archive at Nabble.com.

_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/[email protected]
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.