Avatar of mynetquestions
mynetquestions
 asked on

XML TO XML WITH XSLT

I have been receiving one file like this

<?xml version="1.0" encoding="utf-8"?>
<StudentDocument xmlns:sdtc="urn:sl7-org:sdtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:hvhs="urn:hvhs:student-extensions" xmlns="urn:student-org:v3">
  <recordTarget>
    <StudentRole>
      <id root="22" extension="65478" />
    <id root="23" extension="777-22-333" />
    <id root="24" extension="33333333" />
        <addr use="RT">
        <streetAddressLine>Address1</streetAddressLine>
        <city>City</city>
        <state>ST</state>
        <postalCode>55555</postalCode>
        <country>XT</country>
      </addr>
        <telecom use="TE" value="tel:+17248468200" />
      <Student>
        <name>
          <family>john</family>
              <given>katey</given>
        </name>
      </Student>
      </StudentRoleRole>
</recordTarget>
</StudentDocument>

I want to generate formatted XML like the below by using XSLT. How do i write it in visual studio 2013?

<StudentResultData>
      <ROLLNUMBER>777-22-333</ROLLNUMBER>
      <Phone>7248468200</Phone>
      <firstname>John</firstname>
      <lastname>katey</lastname>
      <address1>Address1</address1>
      <city>City<city>
      <zip>55555</zip>
      <state>ST</state>
      <country>XT</country>
</StudentResultData>
XML.NET Programming

Avatar of undefined
Last Comment
mynetquestions

8/22/2022 - Mon
zc2

Supposedly you have the XML stored in a file, then go to File menu->New->File, Choose "XSLT File".
Create your XSLT script in the new opened window.
To test the XSLT transformation, go to the XML manu, choose "Start XSLT debugging" or press Alt+F5
mynetquestions

ASKER
I know how to open XSLT file in visual studio 2013. I am looking for XSLT code to generate from the given to required XML format
ASKER CERTIFIED SOLUTION
zc2

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
mynetquestions

ASKER
It was really helpful and written my own XSLT files for other XML files based on this solution.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23