Click here to Skip to main content
15,886,038 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRe: How to get behavior similar to the obsoleted XmlValidatingReader Pin
John Whitmire3-Nov-14 3:04
professionalJohn Whitmire3-Nov-14 3:04 
SuggestionRe: How to get behavior similar to the obsoleted XmlValidatingReader Pin
John Whitmire6-Nov-14 2:47
professionalJohn Whitmire6-Nov-14 2:47 
QuestionVB.NET creat new XML Pin
Dereak12-Oct-14 17:43
Dereak12-Oct-14 17:43 
AnswerRe: VB.NET creat new XML Pin
User 41802545-Aug-15 2:28
User 41802545-Aug-15 2:28 
QuestionWriting XML from Excel Using VBA Pin
gedkins@deltagl.com30-Sep-14 14:15
gedkins@deltagl.com30-Sep-14 14:15 
AnswerRe: Writing XML from Excel Using VBA Pin
Richard Deeming1-Oct-14 1:45
mveRichard Deeming1-Oct-14 1:45 
Questiondelimiter or tokenizer in xslt Pin
DanielSatheesh27-Aug-14 1:22
DanielSatheesh27-Aug-14 1:22 
AnswerRe: delimiter or tokenizer in xslt Pin
George Jonsson13-Sep-14 23:55
professionalGeorge Jonsson13-Sep-14 23:55 
You don't mention if there can be one or more example nodes within each catalog node.

This code works if there are many catalog's with one example node.
XML
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>
  <xsl:output method="text" indent="no"/>

  <xsl:template match="catalog">
    <xsl:value-of select="example"/>
  </xsl:template>

</xsl:stylesheet>


And this code works if there are many catalog nodes and many example nodes.
XML
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>
  <xsl:output method="text" indent="no"/>

  <xsl:template match="catalog">
    <xsl:apply-templates select="example" />
  </xsl:template>

  <xsl:template match="example">
    <xsl:value-of select="node()"/>
  </xsl:template>

</xsl:stylesheet>


XSLT is recursive by nature, so no need for the loop.
If you want text output, I don't understand the HTML tags in your example code.
QuestionMultiple namespaces in xslt Pin
MaryJames7-May-14 22:00
MaryJames7-May-14 22:00 
AnswerRe: Multiple namespaces in xslt Pin
Richard MacCutchan7-May-14 22:24
mveRichard MacCutchan7-May-14 22:24 
GeneralRe: Multiple namespaces in xslt Pin
MaryJames8-May-14 3:16
MaryJames8-May-14 3:16 
GeneralRe: Multiple namespaces in xslt Pin
Richard MacCutchan8-May-14 3:19
mveRichard MacCutchan8-May-14 3:19 
QuestionUse XmlAttributeOverrides, but get an InvalidOperationException nevertheless Pin
Christian Treffler2-Apr-14 8:15
Christian Treffler2-Apr-14 8:15 
AnswerRe: Use XmlAttributeOverrides, but get an InvalidOperationException nevertheless Pin
Bernhard Hiller2-Apr-14 21:24
Bernhard Hiller2-Apr-14 21:24 
GeneralRe: Use XmlAttributeOverrides, but get an InvalidOperationException nevertheless Pin
Christian Treffler3-Apr-14 4:03
Christian Treffler3-Apr-14 4:03 
QuestionXpath selecting nodes based on multiple attributes Pin
joost.versteegen4-Dec-13 4:28
joost.versteegen4-Dec-13 4:28 
AnswerRe: Xpath selecting nodes based on multiple attributes Pin
PIEBALDconsult4-Dec-13 4:46
mvePIEBALDconsult4-Dec-13 4:46 
GeneralRe: Xpath selecting nodes based on multiple attributes Pin
joost.versteegen4-Dec-13 20:50
joost.versteegen4-Dec-13 20:50 
AnswerRe: Xpath selecting nodes based on multiple attributes Pin
Richard Deeming4-Dec-13 4:57
mveRichard Deeming4-Dec-13 4:57 
QuestionXPath following-sibling Pin
savbace20-Oct-13 23:20
savbace20-Oct-13 23:20 
QuestionXML validation. Pin
Septimus Hedgehog18-Aug-13 22:02
Septimus Hedgehog18-Aug-13 22:02 
AnswerRe: XML validation. Pin
joost.versteegen5-Dec-13 22:00
joost.versteegen5-Dec-13 22:00 
QuestionSlow group - noob Xml question - converting binary structure to Xml and back? Pin
charlieg24-Jul-13 3:10
charlieg24-Jul-13 3:10 
AnswerRe: Slow group - noob Xml question - converting binary structure to Xml and back? Pin
Richard MacCutchan24-Jul-13 5:06
mveRichard MacCutchan24-Jul-13 5:06 
GeneralRe: Slow group - noob Xml question - converting binary structure to Xml and back? Pin
charlieg24-Jul-13 5:09
charlieg24-Jul-13 5:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.