Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Utility to convert XML to value pair ?

From: "Sam Hobbs" <samuel@------.--.---_------_------_--_----->
To: NULL
Date: 4/11/2008 12:57:00 AM

There are many ways to do the transformation; some languages such as VB make 
it easy to write code to do the transformation. Asking for a tool to do it 
is like asking for a tool to do word processing for word processing 
purposes. The following is one freeware tool that can help but there are 
many others.

http://architag.com/xray


<dingdongdingding@y...> wrote in message 
news:4d0f046e-9126-47a7-ac6b-6e9d4bded452@k......
Hi Peter
    Can I trouble you further ?  May I know how I can execute this
scipt ?  Using what ?  Thanks again.

On Apr 11, 5:29 am, Peter Flynn <peter.n...@m.silmaril.ie> wrote:
> dingdongdingd...@yahoo.com wrote:
> > When I look closer at the XML, I realise that I myself had
> > misinterpreted my needs. Inside the XML, there is a portion where the
> > value are coded as (eg):
>
> > <NameValuePair>
> > <name>Name</name>
> > <value>xxxxxxxxxxxxxxxxx</value>
> > </NameValuePair>
> > <NameValuePair>
> > <name>Address</name>
> > <value>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</
> > value>
> > </NameValuePair>
> > <NameValuePair>
> > <name>Telephone</name>
> > <value>xxxxxxxx</value>
> > </NameValuePair>
> > <NameValuePair>
> > <name>Comments</name>
> > <value/>
> > </NameValuePair>
>
> > Name=xxxxxxxxxxxxxxxxx
> > Address=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> > Telephone=xxxxxxxx
> > Comments=
>
> > So are there any tools that can do this ? Thanks.
>
> Nothing prewritten -- how could a program guess what you want to do?
> But this XSLT script will do it.
>
> <?xml version="1.0"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
>
> <xsl:output method="text"/>
> <xsl:strip-space elements="*"/>
>
> <xsl:template match="NameValuePair">
> <xsl:value-of select="name"/>
> <xsl:text>=</xsl:text>
> <xsl:value-of select="value"/>
> <xsl:text>&#xa;</xsl:text>
> </xsl:template>
>
> </xsl:stylesheet>
>
> ///Peter- Hide quoted text -
>
> - Show quoted text -






transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent