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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:29:32+00:00 2026-05-22T00:29:32+00:00

I have following type of file contains in xml format <?xml version=1.0 encoding=UTF-8?> <root>

  • 0

I have following type of file contains in xml format

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <serviceImpl category="default">
        <package>esterMemoryManagement</package>
        <service singleton="true">
            <provides>xoc.hw.cor.memgt.ZContentType</provides>
            <brief>This sis first sdrevice</brief>
        </service>
    </serviceImpl>
    <serviceImpl category="default">
        <package>w.cor.TesterM</package>
        <service singleton="true">
            <provides>xoc.hw.ZAccessTypeProvid</provides>
            <brief>This sis first sdrevice</brief>
        </service>
    </serviceImpl>
</root>

i have to get all values within tag <provides></provides> in .xsl file. How can i do that?
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-22T00:29:33+00:00Added an answer on May 22, 2026 at 12:29 am

    Here’s one way of doing it:

    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        version="1.0">
    
        <xsl:output method="text"/>
    
        <xsl:template match="root">
            <xsl:apply-templates select="serviceImpl"/>
        </xsl:template>
    
        <xsl:template match="serviceImpl">
            <xsl:apply-templates select="service"/>
            <xsl:text>,</xsl:text>
        </xsl:template>
    
        <xsl:template match="service">
            <xsl:apply-templates select="provides"/>
        </xsl:template>
    
        <xsl:template match="provides">
            <xsl:value-of select="."/>
        </xsl:template>
    
    </xsl:stylesheet>
    

    You may also want to have a look at this question, and related answers.

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

Sidebar

Related Questions

I've got an app.config file, which contains the following <?xml version=1.0 encoding=utf-8 ?> <configuration>
I have a simple doc.xml file which contains a single root element with a
I have C header file containing the following type definition: // example.h typedef struct
If I have defined the following types: type category = Noun | Verb |
I have an existing XML schema that contains a type that I would like
i have a directory which contains the following: -directory -another directory -meta.xml -yet another
I have following array that contains information on each file.but it is in single
Me again... I have an XML File that contains different categories which I would
I have an XML file: <Org href=https://vcloudserver/api/v1.0/org/272521719 type=application/vnd.vmware.vcloud.org+xml name=blah-blah xmlns=http://www.vmware.com/vcloud/v1> <Link href=https://vcloudserver/api/v1.0/vdc/1093121285 type=application/vnd.vmware.vcloud.vdc+xml name=blah-haha
I have following setup in cloud9 IDE. Project root folder Hello.html - contains simple

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.