<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 10">
<meta name=Originator content="Microsoft Word 10">
<link rel=File-List href="cid:filelist.xml@01C1F50E.E3E70540">
<!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]-->
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;
        text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;
        text-underline:single;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        mso-style-noshow:yes;
        mso-ansi-font-size:10.0pt;
        mso-bidi-font-size:10.0pt;
        font-family:Arial;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:windowtext;}
span.SpellE
        {mso-style-name:"";
        mso-spl-e:yes;}
span.GramE
        {mso-style-name:"";
        mso-gram-e:yes;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;
        mso-header-margin:35.4pt;
        mso-footer-margin:35.4pt;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */ 
 table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
        mso-para-margin:0cm;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";}
</style>
<![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple style='tab-interval:36.0pt'>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hi there,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>We are currently involved in a XML project. All messages
will be sent and received in a SOAP-envelope.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Now I tried to read from this SOAP-envelope using JDOM and
managed to read until I get to the content of<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>The &lt;<span class=SpellE>soap<span class=GramE>:Body</span></span>&gt;
element. Within this element all elements have a default namespace without
prefix<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>(<span class=GramE>see</span> XML part at the bottom of this
message).<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>When I use following code:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='text-indent:36.0pt'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>Namespace <span class=SpellE>nsEAN</span>
= <span class=SpellE><span class=GramE>Namespace.getNamespace</span></span><span
class=GramE>(</span>&quot;http://www.ean.nl/&quot;);<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-indent:36.0pt'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>Namespace <span class=SpellE>nsSOAP</span>
= <span class=SpellE><span class=GramE>Namespace.getNamespace</span></span><span
class=GramE>(</span>&quot;<span class=SpellE>soap&quot;,&quot;http://schemas.xmlsoap.org/soap/envelope</span>/&quot;);<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-indent:36.0pt'><span class=SpellE><font size=2
face=Arial><span style='font-size:10.0pt;font-family:Arial'>SAXBuilder</span></font></span><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> builder =
new <span class=SpellE><span class=GramE>SAXBuilder</span></span><span
class=GramE>(</span>&quot;<span class=SpellE>org.apache.xerces.parsers.SAXParser</span>&quot;,
true);<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-indent:36.0pt'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>Document doc = <span class=SpellE><span
class=GramE>builder.build</span></span><span class=GramE>(</span>new File(<span
class=SpellE>dataFile</span>));<o:p></o:p></span></font></p>

<p class=MsoNormal style='text-indent:36.0pt'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>Element el = <span class=SpellE><span
class=GramE>doc.getRootElement</span></span><span class=GramE>(</span>);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-tab-count:1'>            </span><span
class=GramE>el=</span><span class=SpellE>el.getChild</span>(&quot;<span
class=SpellE>Body&quot;,nsSOAP</span>);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-tab-count:1'>            </span><span
class=SpellE><span class=GramE>System.out.println</span></span><span
class=GramE>(</span>&quot;&quot;+<span class=SpellE>el.getContent</span>());<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I get the following:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>[<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'>                </span>,
[Element: &lt;Order [Namespace: http://www.ean.nl]/&gt;],<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'>                </span>,
[Element: &lt;Order [Namespace: http://www.ean.nl]/&gt;],<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'>                </span>,
[Element: &lt;Order [Namespace: http://www.ean.nl]/&gt;],<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'>                </span>,
[Element: &lt;Order [Namespace: http://www.ean.nl]/&gt;],<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'>        </span>]<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>So I can get the content of the &lt;<span class=SpellE>soap<span
class=GramE>:Body</span></span>&gt; Element, but when I now try to read a &lt;Order&gt;
element using:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-tab-count:1'>            </span><span
class=GramE>el=</span><span class=SpellE>el.getChild</span>(&quot;<span
class=SpellE>Order&quot;,nsEAN</span>);<o:p></o:p></span></font></p>

<p class=MsoNormal><span class=GramE><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>or</span></font></span><font size=2
face=Arial><span style='font-size:10.0pt;font-family:Arial'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-tab-count:1'>            </span><span
class=GramE>el=</span><span class=SpellE>el.getChild</span>(&quot;Order&quot;);<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I get &#8220;null&#8221; in return<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Obviously I do something wrong, so could you please explain
to me how to read further through this XML?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Best regards,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Nicolās de Hilster<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>GlobalXion <span class=SpellE><span class=GramE>bv</span></span><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><span class=GramE><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>&lt;?xml</span></font></span><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> version =
&quot;1.0&quot; encoding = &quot;UTF-8&quot;?&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&lt;<span class=SpellE>soap<span class=GramE>:Envelope</span></span>
<span class=SpellE>xmlns:xsi</span> =
&quot;http://www.w3.org/2001/XMLSchema-instance&quot; <span class=SpellE>xmlns:xsd</span>
= &quot;http://www.w3.org/2001/XMLSchema&quot; <span class=SpellE>xmlns:soap</span>
= &quot;http://schemas.xmlsoap.org/soap/envelope/&quot; <span class=SpellE>xmlns</span>
= &quot;http://www.ean.nl&quot; <span class=SpellE>xsi:schemaLocation</span> =
&quot;http://schemas.xmlsoap.org/soap/envelope/ ./<span class=SpellE>EnvelopWithMessages.xsd</span>&quot;&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-tab-count:1'>            </span>&lt;<span
class=SpellE><span class=GramE>soap:</span>Header</span>&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-tab-count:1'>            </span>.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-tab-count:1'>            </span>.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-tab-count:1'>            </span>&lt;/<span
class=SpellE>soap<span class=GramE>:Header</span></span>&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-tab-count:1'>            </span>&lt;<span
class=SpellE><span class=GramE>soap:</span>Body</span>&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-tab-count:2'>                        </span>&lt;Order&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-tab-count:3'>                                    </span>&lt;<span
class=SpellE>OrderHeader</span>&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-tab-count:4'>                                                </span>&lt;<span
class=SpellE>OrderVersion</span>&gt;1.1&lt;/<span class=SpellE>OrderVersion</span>&gt;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>.<o:p></o:p></span></font></p>

<p class=MsoNormal><span class=GramE><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>etc</span></font></span><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>.<o:p></o:p></span></font></p>

</div>

</body>

</html>