Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7846817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T17:43:01+00:00 2026-06-02T17:43:01+00:00

I have the following example XML: <Table> <Row Position=0 Name=FName /> <Row Position=1 Name=LName

  • 0

I have the following example XML:

<Table>
  <Row Position="0" Name="FName" />
  <Row Position="1" Name="LName" />
  <Row Position="2" Name="Email" />
  <Row Position="3" Name="Phone" />
  <Row Position="4" Name="Address" />
</Table>

I want to be able to read this into an output of:

Row: FName
Row: LName
Row: Email
Row: Phone
Row: Address

The ordering for this list however should be based off the Position attribute of the row, so that the output order can be changed by simply changing the number ordering.

I guess this will take a variable or two to complete but not entirely sure on the execution.

Cheers

Example:

Input

<Table>
  <Row Position="0" Name="FName" />
  <Row Position="1" Name="LName" />
  <Row Position="4" Name="Email" />
  <Row Position="2" Name="Phone" />
  <Row Position="3" Name="Address" />
</Table>

Output

Row: FName
Row: LName
Row: Phone
Row: Address
Row: Email
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T17:43:04+00:00Added an answer on June 2, 2026 at 5:43 pm
    <xsl:template match="Table">
      <xsl:apply-templates select="Row">
        <xsl:sort select="@Position" data-type="number"/>
      </xsl:apply-templates>
    </xsl:template>
    
    <xsl:template match="Row">
      <xsl:text>Row: </xsl:text>
      <xsl:value-of select="@Name"/>
      <xsl:text>&#10;</xsl:text>
    </xsl:template>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following XML (partial) document : <export> <table name=CLIENT> <row> <col name=CODE_CLIENT
I want to query the following xml file using LINQ To XML <table> <row>
I have a JDOM element like the following Example:XML(JDOM Element) <Details> <Uniqueno>11111</Uniqueno> <ROWSET name=Persons>
I have example the following xml: <LOCAL_AUTHORITY> <NAME>Derby</NAME> <REGION></REGION> <IRD>22%</IRD> <LOCAL_AUTHORITY> I have the
I have the following XML example <?xml version=1.0?> <test> <items> <item>item 1</item> <item>item 2</item>
So I have the following XML chain: $xml->assessment->outcomes_processing->outcomes->decvar->attributes()->cutvalue XML example In Some XML-files $xml->assessment->outcomes_processing->outcomes->...
I have the following in an XML file: <entry> ... <link href=http://www.example.com/somelink /> ...
I have the following example in a SQL table Cust Group Sales A 1
For example, say I have the following xml in a string: <?xml version=1.0 encoding=UTF-8?>
I have the following JSF table: <?xml version=1.0 encoding=UTF-8?> <!DOCTYPE html PUBLIC -//W3C//DTD XHTML

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.