[jdom-interest] Problem with Jdom8 - getChildren() on root do esn't work...

Deepali Abhyankar dabhyankar at amadeusboston.com
Thu Mar 28 07:05:39 PST 2002


Hi,
I work with Tom and here are the files we are working with. I am attaching
the files.
The original file is etid.xml. 
It gets transformed using the following stylesheet - etid.xsl.
For logging purposes I saved the transformed xml to a log file. Its called
etidxml.log. 

Thanks,
Deepali.

-----Original Message-----
From: Bradley S. Huffman [mailto:hip at a.cs.okstate.edu]
Sent: Thursday, March 28, 2002 9:55 AM
To: Tom Preston
Cc: jdom-interest at jdom.org; hip at a.cs.okstate.edu
Subject: Re: [jdom-interest] Problem with Jdom8 - getChildren() on root
doesn't work... 


What does the document and stylesheet look like? Cann't give a answer if we
cann't reproduce the results :)

Brad

Tom Preston writes:

> Problem with Jdom8 - getChildren() on root doesn't work on a document that
> has been transformed in memory using documented jdom transform
methodology:
>  
> 
>        Transformer transformer = TransformerFactory.newInstance()
>           .newTransformer(new StreamSource(stylesheet));
> 
>        JDOMResult out = new JDOMResult();
>        transformer.transform(new JDOMSource(in), out);
>        return out.getDocument();
>      
>  
> Interesting resulti is that 
>     Element root = doc.getRootElement();
>     boolean hasChildren = root.hasChildren();
>  
> returns "true" while
>     List theChildren = root.getChildren();
>  
> returns a List of size 0 (zero).
>  
> This was NOT a problem with JDOM 7 but is a problem with JDOM 8.
>  
> Note that the doc prior to transformation doesn't have this problem.  Has
> anyone else seen this with 8?  Is it true that I should never get a zero
> size list from getChildren() method if hasChildren() method returned true?
_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: etid.xml
Type: application/octet-stream
Size: 1469 bytes
Desc: not available
Url : http://jdom.org/pipermail/jdom-interest/attachments/20020328/cd4a6fbb/etid.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: etid.xsl
Type: application/octet-stream
Size: 1430 bytes
Desc: not available
Url : http://jdom.org/pipermail/jdom-interest/attachments/20020328/cd4a6fbb/etid-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: etidxml.log
Type: application/octet-stream
Size: 7979 bytes
Desc: not available
Url : http://jdom.org/pipermail/jdom-interest/attachments/20020328/cd4a6fbb/etidxml.obj


More information about the jdom-interest mailing list