?
Solved

Trim XML output with xsl

Posted on 2006-05-01
3
Medium Priority
?
458 Views
Last Modified: 2008-03-17
I have an xml element <day>SUN</day> that I am parsing with asp and outputting to a wireless app that I need to trim so that the output is 'SU'
0
Comment
Question by:mauler
1 Comment
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 500 total points
ID: 16583969
Hi mauler,

if you just need the first two characters, it is pretty simple

    <xsl:template match="day">
        <xsl:value-of select="substring(.,1,2)"/>
    </xsl:template>

if you need a specific mapping, individually for each day,
it requires a bit more work,
let me know if that is the case

Cheers!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question