Welcome to WebmasterWorld Guest from 54.162.155.183

Forum Moderators: httpwebwitch

Message Too Old, No Replies

removing trailing space in xml elements.

<element> value </element>

     
6:08 am on Jul 13, 2011 (gmt 0)



Hi,
I am getting an xml file like this.

<House>
<Refrigirator> Whirlpool </Refrigirator>
<Washing Machine> Samsung</Washing Machine>
<TV> Samsun TV </TV>
<cooler> L G </cooler>
</House>

I have to get the output with out trailing spaces in the XMl elements. No schema restrictions has to be applied on this xml file only either with XSLT/Xquery or any other which suits to this I have to use.


<House>
<Refrigirator>Whirlpool</Refrigirator>
<Washing Machine>Samsung</Washing Machine>
<TV>Samsun TV</TV>
<cooler>L G</cooler>
</House>




Thanks.
6:22 am on Jul 13, 2011 (gmt 0)

WebmasterWorld Administrator brotherhood_of_lan is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Welcome to the forums reachparrot,

removing trailing space in xml elements


Is there any particular scripting language you work with? There are a ton of solutions, it really depends what you work with...
6:42 am on Jul 13, 2011 (gmt 0)



working with OSB (Oracle Service Bus), I have to give this XMl as a input to eiter XSL/Xquery and to get back the XMl with out trailing spaces.
7:12 am on Jul 13, 2011 (gmt 0)

WebmasterWorld Administrator brotherhood_of_lan is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Not really familiar with it but perhaps you've not seen this function list? There are options for trimming strings in there.

[download.oracle.com...]
 

Featured Threads

Hot Threads This Week

Hot Threads This Month