RE: replace < and > with < and >
>> The xml file is returned from a method is in a string format, >> and the xml >> file seems to encode all < and > using < and >. So, >> what I need to do >> is to convert that xml file from a string to a xml nodelist >> so I can access >> all the elements. >No, you need to correct the program that is generating the XML so that >it does it properly. Funny enough I'm dealing with the same problem, the problem in my case is caused by msxml's screwy philosophy of extension functions, i.e that the function can only return text, thus if you have an extension function that returns an rtf, for example if you wrote an improved document() with some decent error handling you're screwed cause your xml is gonna be text with a lot of <>. So basically one can do the following <xsl:value-of select="myfunc:func('http://www.example.com/example.xml')" disable-output-escaping="yes"/> to get the xml out of the extension function. Can one then do the following: <xsl:variable name="nodeset"><result><xsl:value-of select="myfunc:func('http://www.example.com/example.xml')" disable-output-escaping="yes"/> </result></xsl:variable> <xsl:apply-templates select="msxsl:node-set($nodeset)/result"/>? nope. If I want the xml processed, or you want the xml processed as far as I have found, I suppose one will have to do the processing inside the extension function, by perhaps loading in myfunc_func.xsl and processing that xml inside the extension function, returning an rtf to the function which then converts the whole thing to text and then going ahead and converting it back to xml via <xsl:value-of select="myfunc:func('http://www.example.com/example.xml')" disable-output-escaping="yes"/>. Anyway this is what I was thinking about doing to solve my particular problem, if I still feel like solving it, not sure if it's worth it. By the way, If anyone else has a better solution for getting an rtf out of an msxml extension function please tell me. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format