Click here to Skip to main content
15,888,802 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi

I want to create an XML from a XML using XSLT. The input xml would contain some tags that needs to be replaced or added in the output xml. I want write the XSL file for same can you please help me in this

e.g :
Input XML :
XML
<add name="ABC" connectionstring="Data Source=abc;Initial Catalog=abc;Integrated Security=SSPI" />


Output XML generated using XSLT :-
XML
<configuration>
  <connectionstrings>
    <add name="abc" connectionstring="Data Source=abc;Initial Catalog=abc;Integrated Security=SSPI" />
  </connectionstrings>
  <system.web>
    <membership defaultprovider="abc" userisonlinetimewindow="20">
      <providers>
        <clear />
        <add name="abc" type="aabc.BusinessObject.<?xml version=" 1.0="?><br mode=" hold=" /><configuration><br mode=" abc=" connectionString=" data="" source="abc;Initial" catalog="abc;Integrated" security="SSPI"/">
  
  <system.web>
    <membership defaultprovider="abc" userisonlinetimewindow="20">
      <providers>
        <clear />
        <add name="abc" type="aabc.BusinessObject.abc" passwordformat="Encrypted" connectionstringname="abc" enablepasswordretrieval="true" enablepasswordreset="false" requiresquestionandanswer="false" writeexceptionstoeventlog="true" minrequiredpasswordlength="5" minrequirednonalphanumericcharacters="0" requiresuniqueemail="false" />
      </providers>
    </membership>
  </system.web>
</configuration>

"passwordFormat="Encrypted" connectionStringName="abc" enablePasswordRetrieval="true" enablePasswordReset="false" requiresQuestionAndAnswer="false" writeExceptionsToEventLog="true" minRequiredPasswordLength="5" minRequiredNonalphanumericCharacters="0" requiresUniqueEmail="false"/>

Please help me in this. Waiting for your response.

Thanks.

[Edit]Pre tags added, but don't know how to format the last part, so kept it inside code blocks.[/Edit]
Posted
v2
Comments
Sergey Alexandrovich Kryukov 7-Dec-12 15:25pm    
Not a question. You would need to show your code, not just output. You would also need to describe your goal, and tell us: 1) what did you expect to get; 2) what did you observe, 3) why do you think your result is wrong; all of the above should come with appropriate samples.
--SA

1 solution

A couple of tutorial sites to get you started.

http://www.w3schools.com/xsl/xsl_languages.asp
http://webdesign.about.com/od/xslt/a/xslt-tutorial-1.htm
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900