Guest santhoshbkartha Posted August 17, 2006 Share Posted August 17, 2006 I use xslt to get a csv format output from an xml document.Three scenarios which i need to handle:1. The node which i refer to in the value-of select statement is present ie xml has tag and value.<messageIdentifier>324057jhfjd</messageIdentifier>2. The node which i refer to in the value-of select statement is not present ie xml dosent have the tag or value.<!--<messageIdentifier>324057jhfjd</messageIdentifier> --> ie no messgeIdentifier tag3. The node which i refer to in the value-of select statement is present but with null value ie xml has tag value pairs.<messageIdentifier></messageIdentifier>First scenario is handled with this statement:messageIdentifier,<xsl:value-of select="/SyncData/Header/messageIdentifier/text()"/>For the second and third scenario i need to get an output like:messageIdentifier,nullCan you please help?Kartha Link to comment Share on other sites More sharing options...
Reg Edit Posted August 17, 2006 Share Posted August 17, 2006 http://www.w3schools.com/xsl/xsl_choose.asp Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now