Hi,
   You can do like below as well.

String filePath = "my-xml-files/MyXMLFile.xml";
OMElement documentElement = new StAXOMBuilder(filePath).getDocumentElement();



On Wed, Jul 16, 2008 at 3:28 PM, Heshan Suriyaarachchi <
[EMAIL PROTECTED]> wrote:

> Hi  Pierre,
>        I do not understand what exactly that  you want to do, but you can
> do a thing like this
>
>         String str2 =
> "<deduct><var1>1.8</var1><var2>4.87594</var2></deduct>";
>         StAXOMBuilder builder = new StAXOMBuilder(new
> ByteArrayInputStream(str2.getBytes()));
>         OMElement om = builder.getDocumentElement();
>
> Then you can do the AXIOM stuff that you want to do with the OMElement.
> Following articles will help you to get an understanding on AXIOM.
>
>
> [1] - http://www.ibm.com/developerworks/webservices/library/ws-java2/
> [2] - http://ws.apache.org/axis2/1_0/OMTutorial.html
> [3] - http://wso2.org/library/2512
>
>
>
> On Mon, Jul 7, 2008 at 7:59 PM, pierre posset <[EMAIL PROTECTED]>
> wrote:
>
>>  Hello,
>>
>>    I need to translate this XML in a java classe:
>>
>> <soap:Envelope>
>>     <soap:Header>
>>         <wsse:Security SOAP-ENV:mustUnderstand="1">
>>           <wsse:UsernameToken xsi:type="wsse:UsernameTokenType">
>>             <wsse:Username>username</wsse:Username>
>>             <wsse:Password
>> Type="wsse:PasswordText">password</wsse:Password>
>>           </wsse:UsernameToken>
>>         </wsse:Security>
>>     </soap:Header>
>>     <soap:Body>
>>         <CreateAdvertiser xmlns="http://server/service";>
>>             <xmlAdv>
>>                 <Name>Advertiser Name</Name>
>>                 <Address>Advertiser Address</Address>
>>             </xmlAdv>
>>         </CreateAdvertiser>
>>     </soap:Body>
>> </soap:Envelope>
>>
>> and I don't find a document which explain me how to do.
>>
>> I have tried to use AXIOM but of course it doesn't work because I don't
>> really know what I am doing.
>>
>> I really need help.
>>
>> Thank you very much.
>>
>> Best Regards.
>>
>> ------------------------------
>> Discutez gratuitement avec vos amis en vidéo ! Téléchargez Messenger,
>> c'est gratuit ! <http://www.windowslive.fr/majmessenger.asp>
>>
>
>
>
> --
> Regards,
> Heshan Suriyaarachchi
>
> http://heshans.blogspot.com/
>



-- 
Regards,
Heshan Suriyaarachchi

http://heshans.blogspot.com/

Reply via email to