atrribute value using msxml from xml

Posted by edwards on Stack Overflow See other posts from Stack Overflow or by edwards
Published on 2010-04-09T15:30:53Z Indexed on 2010/04/09 15:33 UTC
Read the original article Hit count: 336

Filed under:

Hi

I have the folowing XML

<?xml version="1.0" encoding="ISO-8859-1" ?> 
- <DEVICEMESSAGES>
  <VERSION xml="1" checksum="" revision="0" envision="33050000" device="" /> 
  <HEADER id1="0001" id2="0001" content="Nasher[<messageid>]: <!payload>" /> 
  <MESSAGE level="7" parse="1" parsedefvalue="1" tableid="15" id1="24682" id2="24682" eventcategory="1003010000" content="Access to <webpage> was blocked due to its category (<info> by <hostname>)" /> 
  </DEVICEMESSAGES>

I am using the following xslt

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:output method="text"/>
     <xsl:strip-space elements="*"/>

     <xsl:template match="DEVICEMESSAGES">
       <xsl:value-of select="@id2"/>,<xsl:text/>
       <xsl:value-of select="@content"/>,<xsl:text/>
       <xsl:text>&#xa;</xsl:text>
     </xsl:template>

</xsl:stylesheet>

when i use MSXML i just get ,, whereas i want to have something like id2, content 0001 , Nasher[]: "

© Stack Overflow or respective owner

Related posts about xslt