<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2715.400" name=GENERATOR></HEAD>
<BODY>
<DIV>
<DIV><SPAN class=182342318-19122002><FONT face=Arial size=2>Hi, I am using
JDOM for a project I am working on and I have come across a problem I am using a
product called RRDTool to "xport" XML data to me the problem I am having is that
the data looks like the following.</FONT></SPAN></DIV>
<DIV><SPAN class=182342318-19122002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=182342318-19122002><FONT face=Arial
size=2><xport></FONT></SPAN></DIV>
<DIV><SPAN class=182342318-19122002><FONT face=Arial size=2>
<data></FONT></SPAN></DIV>
<DIV><SPAN class=182342318-19122002><FONT face=Arial
size=2> <row><t>some
time</t><v><SPAN class=629593020-19122002>Input</SPAN>
value</v><v><SPAN class=629593020-19122002>Output</SPAN>
value</v></row></FONT></SPAN></DIV>
<DIV><SPAN class=182342318-19122002><FONT face=Arial
size=2> ......</FONT></SPAN></DIV>
<DIV><SPAN class=182342318-19122002><FONT face=Arial size=2>
</data></FONT></SPAN></DIV>
<DIV><SPAN class=182342318-19122002><FONT face=Arial
size=2></xport></FONT></SPAN></DIV>
<DIV><SPAN class=182342318-19122002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=182342318-19122002><FONT face=Arial><FONT size=2>I have no
problems if there is only 1 "v" tag but if there is 2 I can't access the
text. I need to evaluate each "row" the code I use for one "v" is below
but how do I access the second "v" //v1.getChild( "v" ).getChildText( "v" )
doesn't work. Any thoughts?<SPAN class=629593020-19122002> I need to
test each "v" (can I use xpath below // v1.getChildText( "t/v/v" )
??</SPAN></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=182342318-19122002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=182342318-19122002><FONT face=Arial
size=2> Document rrd = new
SAXBuilder().build(input);<BR> List rate =
rrd.getRootElement().getChild( "data" ).getChildren( "row"
);<BR> Iterator itr1 = ( rate
).iterator();</FONT></SPAN></DIV>
<DIV><SPAN class=182342318-19122002><BR><FONT face=Arial
size=2> while( itr1.hasNext() )
{<BR> Element v1 = ( Element
)itr1.next();</FONT></DIV>
<DIV><FONT face=Arial
size=2> System.out.println(v1.getChildText( "v"
));</FONT></DIV>
<DIV></SPAN><SPAN class=182342318-19122002><FONT face=Arial
size=2>}</FONT></SPAN></DIV>
<DIV><SPAN class=182342318-19122002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=182342318-19122002><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=182342318-19122002><FONT face=Arial size=2>thank you very
much,</FONT></SPAN></DIV></DIV>
<DIV>
<P
style="MARGIN: 1px 0px; WORD-SPACING: 1px; TEXT-INDENT: 0px; LINE-HEIGHT: 100%"
align=left><A href="http://www.cutthroatcom.com/"><IMG height=124
src="cid:629593020@19122002-3381" width=218 align=left border=0></A><B><FONT
size=4>Chris Buckley</FONT></B>
<P
style="MARGIN: 1px 0px; WORD-SPACING: 1px; TEXT-INDENT: 0px; LINE-HEIGHT: 100%"
align=left>Cutthroat Communications, Inc.</P>
<P
style="MARGIN: 1px 0px; WORD-SPACING: 1px; TEXT-INDENT: 0px; LINE-HEIGHT: 100%"
align=left>Network Operations</P>
<P
style="MARGIN: 1px 0px; WORD-SPACING: 1px; TEXT-INDENT: 0px; LINE-HEIGHT: 100%"
align=left>Bus (406) 556-1778</P>
<P
style="MARGIN: 1px 0px; WORD-SPACING: 1px; TEXT-INDENT: 0px; LINE-HEIGHT: 100%"
align=left>Fax (406) 585-9645</P>
<P
style="MARGIN: 1px 0px; WORD-SPACING: 1px; TEXT-INDENT: 0px; LINE-HEIGHT: 100%"
align=left>Bozeman, MT 59718</P>
<P
style="MARGIN: 1px 0px; WORD-SPACING: 1px; TEXT-INDENT: 0px; LINE-HEIGHT: 100%"
align=left><A
href="http://www.cutthroatcom.com/">http://www.cutthroatcom.com</A></P></DIV>
<P
style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; WORD-SPACING: 0px; MARGIN-LEFT: 66pt; TEXT-INDENT: -66pt; LINE-HEIGHT: 100%; mso-pagination: none; mso-layout-grid-align: none; mso-list: l0 level3 lfo1; tab-stops: list 66.0pt"
align=left> </P>
<P
style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; WORD-SPACING: 0px; MARGIN-LEFT: 55px; LINE-HEIGHT: 100%; mso-pagination: none; mso-layout-grid-align: none"
align=left><SPAN
style="TEXT-TRANSFORM: uppercase; COLOR: gray; mso-color-alt: black; text-effect: engrave"><FONT
face=Tahoma color=#000000 size=2><STRONG><B
style="TEXT-TRANSFORM: uppercase; COLOR: gray; mso-color-alt: black; text-effect: engrave; mso-bidi-font-weight: normal">The
Promise of Broadband access is here.</B></STRONG></FONT></SPAN><FONT
face=Arial><SPAN
style="FONT-SIZE: 10pt; TEXT-TRANSFORM: uppercase; COLOR: gray; FONT-FAMILY: Tahoma; mso-color-alt: black; text-effect: engrave"><B
style="mso-bidi-font-weight: normal"><?XML:NAMESPACE PREFIX = O /><O:P>
</O:P></B></SPAN></P></FONT>
<DIV> </DIV></BODY></HTML>