homepage Welcome to WebmasterWorld Guest from 107.20.34.144
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / XML Development
Forum Library, Charter, Moderators: httpwebwitch

XML Development Forum

    
removing trailing space in xml elements.
<element> value </element>
reachparrot



 
Msg#: 4338836 posted 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.

 

brotherhood of LAN

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



 
Msg#: 4338836 posted 6:22 am on Jul 13, 2011 (gmt 0)

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...

reachparrot



 
Msg#: 4338836 posted 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.

brotherhood of LAN

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



 
Msg#: 4338836 posted 7:12 am on Jul 13, 2011 (gmt 0)

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...]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / XML Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved