Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Empty XML output after ASP XSL transformation [Thread Next] Re: Empty XML output after ASP XSL transformationTo: NULL Date: 7/3/2005 11:47:00 AM doneill@a... wrote:
> "<xsl:template match=""/"">" & _
> "<div>" & _
> "<div>test1</div>" & _
> "<div>test2</div>" & _
> "</div>" & _
> "<div>test3</div><!--Remove this line and it works-->" & _
> "</xsl:template>" & _
The result is not an XML document, but XML fragment as it has two root
elements.
> Set objXSL = Server.CreateObject("MSXML2.DOMDocument")
> objXSL.loadXML(strXSL)
>
> Set objXML = Server.CreateObject("MSXML2.DOMDocument")
> With objXML
> .async = false
> .preserveWhitespace = false
> Call .loadXML(strXML)
> Call .transformNodetoObject(objXSL, objXML)
That's weird. You are transforming objXML and place result in objXML
too? Anyway, MSXML2.DOMDocument can't handle XML fragments, but only XML
documents with a single root element.
--
Oleg Tkachenko [XML MVP, MCAD]
http://www.xmllab.net
http://blog.tkachenko.com
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
