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">
      <id root="22" extension="65478" />
    <id root="23" extension="777-22-333" />
    <id root="24" extension="33333333" />
        <addr use="RT">
        <telecom use="TE" value="tel:+17248468200" />

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

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
mynetquestionsAuthor Commented:
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
Here is the XSLT sample:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl s"
    <xsl:output method="xml" indent="yes"/>

    <xsl:template match="s:StudentDocument">
            <xsl:apply-templates select="s:recordTarget/s:StudentRole"/>

    <xsl:template match="s:StudentRole">
          <ROLLNUMBER><xsl:value-of select="s:id[@root=23]/@extension"/></ROLLNUMBER>
          <Phone><xsl:value-of select="substring-after(s:telecom[@use='TE']/@value,'+1')"/></Phone>
          <firstname><xsl:value-of select="s:Student/s:name/s:family"/></firstname>
          <lastname><xsl:value-of select="s:Student/s:name/s:given"/></lastname>
          <address1><xsl:value-of select="s:addr/s:streetAddressLine"/></address1>
          <city><xsl:value-of select="s:addr/s:city"/></city>
          <zip><xsl:value-of select="s:addr/s:postalCode"/></zip>
          <state><xsl:value-of select="s:addr/s:state"/></state>
          <country><xsl:value-of select="s:addr/s:country"/></country>

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mynetquestionsAuthor Commented:
It was really helpful and written my own XSLT files for other XML files based on this solution.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.