[jdom-interest] Extracting ProcessingInstructions
DELAJARTE François
francois.delajarte at infotel.com
Fri May 3 04:50:57 PDT 2002
Hi!
I'm new to JDOM and i use beta 8.
My problem is that i would like to extract the first line of my XML document (<? xml etc... ?>).
So i use the getContent() method on my JDOM Document but i just get one element representing the root element and nothing more...
Here is my piece of code :
java.util.List list = theDoc.getContent();
java.util.ListIterator iter = list.listIterator();
while (iter.hasNext())
{
Object obj = iter.next();
if (obj instanceof org.jdom.ProcessingInstruction)
{
// do things...
break;
}
}
I tried to put comments and i could extract them. It's just like if the parsing operation delete the only line i would like to have ... so frustrating...
Hope one could help because i read Jason's response on nearly the same question but... it doesn't work for me.
Francois
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20020503/920c1876/attachment.htm
More information about the jdom-interest
mailing list