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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:11:24+00:00 2026-05-23T14:11:24+00:00

I need to test a software enhancement I made recently. To do this, I

  • 0

I need to test a software enhancement I made recently. To do this, I need to make 1000 changes in 56 xml loader files (so 56,000 total). Specifically, I need to change the following:

   </users> 
</service>

into this

   </users>
   <rules>
       <ruleid="13e77ade-f15c-433f-aac8-2fdaf2d867a5" /> 
   </rules>
   <temprestriction /> 
</service>

I could do a find/replace on each of the 56 files, but that would be tedious. Is there a good way to automate this process? Thanks in advance.

  • 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-23T14:11:24+00:00Added an answer on May 23, 2026 at 2:11 pm

    Like @ConradFrix mentioned in a comment: you can use different tools/methods to solve this problem.

    Here is a solution based on XSLT. The code is not tested extensively.

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    
        <xsl:output indent="yes" method="xml" encoding="utf-8" omit-xml-declaration="yes"/>
    
        <xsl:template match="node() | @*" name="identity">
            <xsl:copy>
                <xsl:apply-templates select="node() | @*"/>
            </xsl:copy>
        </xsl:template>
    
        <xsl:template match="service/*[last()][self::users]">
            <xsl:call-template name="identity"/>
            <rules>
                <rule id="13e77ade-f15c-433f-aac8-2fdaf2d867a5" />
            </rules>
            <temprestriction />
        </xsl:template>
    
    </xsl:stylesheet>
    

    Key points: 1) using an identity template to recursively copy nodes of the document 2) a separate template to add new elements after <users> element if it is a last child of a <service> element.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a piece of simulation software, and need an efficient way to test
I need to test a software that treats some mouse movements as gestures. For
I'm working on a software for test automation. To get it working it need's
I'm working on a software that make some test on report before sent it
I need to test whether various types of database objects exist in a given
I need to test a serial port application on Linux, however, my test machine
I need to test a site with a dynamic menu in Mac Firefox, but
I need to test if a file is a shortcut. I'm still trying to
I need to test a JDBC connection to a database. The java code to
I need to test a function that needs to query a page on an

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.