response xml format <name xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:nil="true" /> Change <name><name>

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

response xml format <name xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:nil="true" /> Change <name><name>

hellozengsong@gmail
I have an XML :
<ns:return>
<name xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:nil="true" />
</ns:return>
I need to change the following format:
<ns:return>
<name></name>
</ns:return>
Unknown to any good solution ?

hellozengsong@gmail
Reply | Threaded
Open this post in threaded view
|

Re: response xml format <name xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:nil="true" /> Change <name><name>

Chamila Wijayarathna
Hi,
Try using XSLT Transformatios [1]. It can be used to convert XML from one format to another.


Thank You


On Mon, Jan 20, 2014 at 2:25 PM, hellozengsong@gmail <[hidden email]> wrote:
I have an XML :
<ns:return>
<name xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:nil="true" />
</ns:return>
I need to change the following format:
<ns:return>
<name></name>
</ns:return>
Unknown to any good solution ?

hellozengsong@gmail



--
Chamila Dilshan Wijayarathna,
SMIEEE, SMIESL,
Undergraduate,
Department of Computer Science and Engineering,
University of Moratuwa.
Reply | Threaded
Open this post in threaded view
|

Re: Re: response xml format <name xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:nil="true" /> Change <name><name>

hellozengsong@gmail

No.
BeanUtil.getOMElement(new QName(""),list.toArray(),new QName(""), false, null ) generates XML Conversion :
<name xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:nil="true" />
 
OMElement empty element auto format as:<name/>
my default xml empty element format:<name></name>
 
 
 
 

hellozengsong@gmail
 
Date: 2014-01-21 03:17
Subject: Re: response xml format <name xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:nil="true" /> Change <name><name>
Hi,
Try using XSLT Transformatios [1]. It can be used to convert XML from one format to another.


Thank You


On Mon, Jan 20, 2014 at 2:25 PM, hellozengsong@gmail <[hidden email]> wrote:
I have an XML :
<ns:return>
<name xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:nil="true" />
</ns:return>
I need to change the following format:
<ns:return>
<name></name>
</ns:return>
Unknown to any good solution ?

hellozengsong@gmail



--
Chamila Dilshan Wijayarathna,
SMIEEE, SMIESL,
Undergraduate,
Department of Computer Science and Engineering,
University of Moratuwa.
Reply | Threaded
Open this post in threaded view
|

list Converter OMElement empty element of Output format

hellozengsong@gmail
In reply to this post by hellozengsong@gmail
BeanUtil.getOMElement(new QNam("us"),list.toArray(),new QName("usinfo"),false,null) 
list element value is equal to null,Generated OMElement empty element XML format as:
<us>
<usinfo>
<name xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:nil="true" />
<age>23</age>
</usinfo>
</us>
 
This is not an empty element format I want, I want an empty element format is <name> </name>
You may have good suggestions unknown.