Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

xslt Transformation

$
0
0

Hi, I have the following xml

<?xml version="1.0" standalone="yes"?><dsValidation xmlns="http://tempuri.org/dsValidation.xsd"><PierbridgeAddressValidationRequest><Carrier>12</Carrier><UserName>username</UserName><Address><City>Dexter</City><Region>MO</Region><PostalCode>63841</PostalCode><Country>USA</Country><Street>11099 County Road 657</Street></Address></PierbridgeAddressValidationRequest></dsValidation>

and I would like to transform it to this

<?xml version="1.0" encoding="utf-8"?><PierbridgeAddressValidationRequest><Carrier>12</Carrier><UserName>username</UserName><Address><City>Dexter</City><Region>MO</Region><PostalCode>63841</PostalCode><Country>USA</Country><Street>11099 County Road 657</Street></Address></PierbridgeAddressValidationRequest>

I started with the following;

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:param name="TopNode"/><xsl:template match="/"></xsl:template></xsl:stylesheet>

I intend to pass a parameter called TopNode =PierbridgeAddressValidationRequest.

Also all the nodes inside TopNode could be named differently, but could get it to work.

Anyone?

Thanks



Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>