<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2655.35">
<TITLE>RE: [jdom-interest] Re: Problem getting children</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>Use root.getChildren("a", Namespace.getNamespace("x-schema:SomeSchema.xdr"));</FONT>
</P>
<P><FONT SIZE=2>rolf</FONT>
</P>
<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Kenneth Ellefsen [<A HREF="mailto:kellefsen@bergen.oilfield.slb.com">mailto:kellefsen@bergen.oilfield.slb.com</A>]</FONT>
<BR><FONT SIZE=2>Sent: Tuesday, August 26, 2003 5:31 AM</FONT>
<BR><FONT SIZE=2>To: jdom-interest@jdom.org</FONT>
<BR><FONT SIZE=2>Subject: [jdom-interest] Re: Problem getting children</FONT>
</P>
<BR>
<P><FONT SIZE=2>missing slash in the end rootnode tag. It's just an example.</FONT>
<BR><FONT SIZE=2>On Tue, 2003-08-26 at 11:28, Kenneth Ellefsen wrote:</FONT>
<BR><FONT SIZE=2>> Hi!</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> I've been using jdom for quite a while, but haven't had to look into</FONT>
<BR><FONT SIZE=2>> schemas yet.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> I now have the following problem.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> I recive a xml file from an external source that contains a schema like</FONT>
<BR><FONT SIZE=2>> this example:</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> <rootnode xmlns="x-schema:SomeSchema.xdr"></FONT>
<BR><FONT SIZE=2>> <a/></FONT>
<BR><FONT SIZE=2>> <rootnode></FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> I parse the file using SAXParser, and get the root element.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> If I try to do:</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> root.getChildren("a");</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> I get an empty list back.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> If I remove the root attribute xmlns="x-schema:SomeSchema.xdr" the same</FONT>
<BR><FONT SIZE=2>> code gets the a elements.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> I'm using Jdom B8, and can't upgrade at this point in time.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Any suggestions what to do?</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Thanks,</FONT>
<BR><FONT SIZE=2>> Kenneth</FONT>
<BR><FONT SIZE=2>-- </FONT>
<BR><FONT SIZE=2>Mvh,</FONT>
</P>
<P><FONT SIZE=2>Kenneth Ellefsen | Tlf: (+47) 55985829</FONT>
<BR><FONT SIZE=2>Schlumberger Information Solutions | www.sis.slb.com</FONT>
</P>
<BR>
<P><FONT SIZE=2>_______________________________________________</FONT>
<BR><FONT SIZE=2>To control your jdom-interest membership:</FONT>
<BR><FONT SIZE=2><A HREF="http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com" TARGET="_blank">http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com</A></FONT>
</P>
</BODY>
</HTML>