[jdom-interest] Problem

philip.nelson at omniresources.com philip.nelson at omniresources.com
Thu Jun 7 13:44:00 PDT 2001


Not sure why you are posting this to a JDOM list as it is a DOM question.

I don't see enough code to venture a reasonable guess.  Usually it happens
when you don't account for text nodes in a child list.

> -----Original Message-----
> From: Pablo Chepalich [mailto:pch at montevideo.com.uy]
> Sent: Thursday, June 07, 2001 12:29 PM
> To: jdom-interest at jdom.org
> Subject: [jdom-interest] Problem
> 
> 
> 
> > Hi,
> > I have some problems when I try to execute this lines of code:
> > 
> > line1: org.w3c.dom.Document oDoc =
> > (org.w3c.dom.Document)domBuilder.build(new
> > File("C:/Prueba/Pruebas/XmlExcel/prueba.xml"));
> > 
> > line 2: generateObjs( oDoc)
> > 
> > jdom returns me a ClassCastException in line 1
> > 
> > I want to do this
> >  public generateObjs(org.w3c.dom.Node oNode){
> >     switch(oNode.getNodeType()){
> >         case oNode.DOCUMENT_NODE:
> >             ---
> >             ---
> >             break
> > 
> >         case Node.ELEMENT_NODE:
> >             ---
> >             NodeList childrens = oNode.getChildNodes();
> >             for(---){
> >                 generateObjs((Node)childrens.item(i));
> >             }
> >             break
> > }
> > }
> 
> any sugestion...
> 
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/yo
uraddr at yourhost.com



More information about the jdom-interest mailing list