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 719787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:41:02+00:00 2026-05-14T05:41:02+00:00

I have data like: <td>USERID</td> <td>NAME</td> <td>RATING</td> I want to transform it into: <userid></userid>

  • 0

I have data like:

    <td>USERID</td>

    <td>NAME</td>

    <td>RATING</td>

I want to transform it into:

<userid></userid>
<name></name>
<rating></rating>

How can I do this?

  • 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-05-14T05:41:03+00:00Added an answer on May 14, 2026 at 5:41 am

    Use a computed element constructor to generate an element with the lower-case value of the text nodes for each of the td elements.

    A computed element constructor
    creates an element node, allowing both
    the name and the content of the node
    to be computed.

    For the sake of the example, assuming that your XML is in a file called foo.xml, you could do something like this:

    <doc>
    {
    for $name in doc('foo.xml')//td/text()
    return element {lower-case($name)} {''}
    }
    </doc>
    

    to produce this:

    <?xml version="1.0" encoding="UTF-8"?>
    <doc>
     <userid/>
     <name/>
     <rating/>
    </doc>
    

    You could also evaluate the lower-case() function as part of the XPATH expression instead of the element constructor, like this:

    <doc>
    {
    for $name in doc('foo.xml')//td/text()/lower-case(.)
    return element {$name} {''}
    }
    </doc>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table like this: Application,Program,UsedObject It can have data like this: A,P1,ZZ
i have a table which Data is like userID name amount Date 1 mark
I have data like this: Team | goal a | 5 b | 8
Say I have data like this: <option value=abc >Test - 123</option> <option value=def >Test
I have MYSQL data like this id | number 1 | 3 4 |
I have some data like this : 1 TC1 PASS 2 TC2 FAIL 3
I have some data like this: -1,2752 -1,4735 1 -0,5500 1,3287 2 -1,6293 -2,1460
i have json data like this {GetStudentDetails: {TotalCount:5, RootResults:[ {city:West Chester,country:USA,state:PA ,student_id:100}, {city:Philly,country:USA,state:PA,student_id:101}, {city:Buffalo,country:USA,state:NY,student_id:102},
I have the following tables: users userId|name items itemId|userId|description What I want to achieve:
Say I have a collection of users like this:- { _id : 1234, Name

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.