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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:26:05+00:00 2026-05-31T14:26:05+00:00

I have a giant XML file in which I would like to update a

  • 0

I have a giant XML file in which I would like to update a single value. Is there a way to write an XSLT file which will produce an exact copy of the existing XML file with a simple change?

For instance, let’s say I have the following XML and that I want to change the position number of employee Martin to 100. How can I do this?

<?xml version="1.0" encoding="utf-8"?>
<Employees>
  <!-- ... -->

  <Employee name="Martin">
    <Position number="50" />
  </Employee>

    <!-- ... -->
</Employees>
  • 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-31T14:26:07+00:00Added an answer on May 31, 2026 at 2:26 pm
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        version="1.0">
    
        <!--Identity template that will copy every
            attribute, element, comment, and processing instruction
            to the output-->
        <xsl:template match="@*|node()">
            <xsl:copy>
                <xsl:apply-templates select="@*|node()"/>
            </xsl:copy>
        </xsl:template>
    
        <!--more specific template match on @number that will 
            change the value to 100-->
        <xsl:template match="Employee[@name='Martin']/Position/@number">
            <xsl:attribute name="number">100</xsl:attribute>
        </xsl:template>
    
    </xsl:stylesheet>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a giant text file (about 1,5 gigabyte) with xml data in it.
So I have these giant XML files (and by giant, I mean like 1.5GB+)
I have a gant script in my grails project. I would like to do
i have a (hopefully) simple question: Can i modify a xml file located in
We have some standalone devices that will send XML messages to arbitrary processing software
Here is the problem: I have one giant string of xml data stored in
I have a Linq.Binary object and I would like to convert it to the
Have you ever seen any of there error messages? -- SQL Server 2000 Could
Have just started using Visual Studio Professional's built-in unit testing features, which as I
Currently, we use a giant configuration object that is serialized to/from XML. This has

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.