Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Generate xml from java object

Reply
Thread Tools

Generate xml from java object

 
 
mike
Guest
Posts: n/a
 
      03-12-2009
Hi,

I need to generate the following xml for a 100 users so I thougth I
generate it.

<typ:WOUser>
<typ:id>
<typ:serviceProviderId>AOne</typ:serviceProviderId>
<typ:companyId>Acme</typ:companyId>
<typ:userId>Alice</typ:userId>
</typ:id>
<typ:sipAddress>sip:(E-Mail Removed)</typ:sipAddress>
<typ:firstName>Alice</typ:firstName>
<typ:lastName>Wonderland</typ:lastName>
<typassword>{SHA}gpw4BEAbByf3D3PUQV4WJADL5Xs=</
typassword>
</typ:WOUser>
</wopi:createUser>

The problem I have is to add the prefix typ when I generate it from an
WOUser object. Is there a good framework that can do it?

All hints and ideas are welcome.
 
Reply With Quote
 
 
 
 
Arne Vajh°j
Guest
Posts: n/a
 
      03-12-2009
mike wrote:
> I need to generate the following xml for a 100 users so I thougth I
> generate it.
>
> <typ:WOUser>
> <typ:id>
> <typ:serviceProviderId>AOne</typ:serviceProviderId>
> <typ:companyId>Acme</typ:companyId>
> <typ:userId>Alice</typ:userId>
> </typ:id>
> <typ:sipAddress>sip:(E-Mail Removed)</typ:sipAddress>
> <typ:firstName>Alice</typ:firstName>
> <typ:lastName>Wonderland</typ:lastName>
> <typassword>{SHA}gpw4BEAbByf3D3PUQV4WJADL5Xs=</
> typassword>
> </typ:WOUser>
> </wopi:createUser>
>
> The problem I have is to add the prefix typ when I generate it from an
> WOUser object. Is there a good framework that can do it?


Maybe JAXB.

Arne
 
Reply With Quote
 
 
 
 
Arved Sandstrom
Guest
Posts: n/a
 
      03-13-2009
"mike" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I need to generate the following xml for a 100 users so I thougth I
> generate it.
>
> <typ:WOUser>
> <typ:id>
> <typ:serviceProviderId>AOne</typ:serviceProviderId>
> <typ:companyId>Acme</typ:companyId>
> <typ:userId>Alice</typ:userId>
> </typ:id>
> <typ:sipAddress>sip:(E-Mail Removed)</typ:sipAddress>
> <typ:firstName>Alice</typ:firstName>
> <typ:lastName>Wonderland</typ:lastName>
> <typassword>{SHA}gpw4BEAbByf3D3PUQV4WJADL5Xs=</
> typassword>
> </typ:WOUser>
> </wopi:createUser>
>
> The problem I have is to add the prefix typ when I generate it from an
> WOUser object. Is there a good framework that can do it?
>
> All hints and ideas are welcome.


You might want to investigate JAXB.

AHS


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Generate an XML in Java using an XML Schema vmtigno@yahoo.com Java 1 04-18-2006 06:02 PM
Generate an XML in Java using an XML Schema vmtigno@yahoo.com Java 1 04-18-2006 05:06 PM
How to generate variable labels for same component within a generate loop Weng Tianxiang VHDL 5 02-16-2006 01:45 PM
ASP XML Support - Generate XML string from FORM DATA based on XML schema Matt ASP General 3 04-23-2004 07:12 PM
How to generate xml using a xml schema in java? Raj Java 0 09-12-2003 10:03 PM



Advertisments