Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: Utility to convert XML to value pair ? [Thread Next] Re: Utility to convert XML to value pair ?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>
</xsl:text>
> </xsl:template>
>
> </xsl:stylesheet>
>
> ///Peter- Hide quoted text -
>
> - Show quoted text -
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
