[jdom-interest] help
Gina Pan
jin.pan at gopromotions.co.nz
Thu Oct 9 15:38:14 PDT 2003
Hi,
I am trying to use DOMBuilder to read an XML file to a DOM tree but it
gives me an error as shown below:
org.jdom.JDOMException: Error in building from stream: Class
org.jdom.input.DOMBuilder can not access a member of class
gnu.xml.dom.JAXPFactory$JAXPBuilder with modifiers "public"
at org.jdom.input.DOMBuilder.build(DOMBuilder.java:298)
at nz.co.mortgagechoice.MCSession.loadFromXML(MCSession.java:207)
at nz.co.mortgagechoice.MCSession.<init>(MCSession.java:185)
at nz.co.mortgagechoice.ui.MCContext.<init>(MCContext.java:46)
at
nz.co.mortgagechoice.ui.MortgageChoiceApplication.<init>(MortgageChoiceA
pplication.java:19)
at
nz.co.mortgagechoice.ui.MortgageChoiceApplication.main(MortgageChoiceApp
lication.java:52)
****************************************
Here is my code which causes the problem:
import org.jdom.*;
import org.jdom.input.*;
import org.jdom.output.*;
public void loadFromXML () throws Exception {
Document document = null;
Element element = null;
InputStream stream = getClass().getResourceAsStream ("/config.xml");
if (stream == null){
return;
}
DOMBuilder builder = new DOMBuilder ();
document = builder.build (stream);
if ((document == null)
|| (document.getRootElement() == null)
|| (!document.getRootElement().getName().equals("config")))
throw new Exception("invalid document");
.....
.....
}
Could anybody please help me?
Many thanks,
Gina
DISCLAIMER: The content of this email is confidential and may contain legally privileged information intended only for the individual or entity named above. Access to this message by anyone else is unauthorised. If you are not the intended recipient, please be advised that the use, distribution and publication of the above information is prohibited. If you have received this email in error, please contact us by returning the email and destroying the original. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20031010/17654703/attachment.htm
More information about the jdom-interest
mailing list