|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: MSXML3 transformNodeToObject method error
Hi Brook,
If you are going to use .transformNodeToObject() you would be well
advised not to specify the second parameter (the output) as an XML DOM
if the stylesheet is producing HTML (i.e. method="html"). This is
because HTML output will often not constitute well-formed XML -
therefore an attempt to push it into an XML DOM will result in an error.
The second parameter of .transformNodeToObject() can also be any object
whose interface supports a .write() method - allowing the output to be
written directly to that object. In your case, using ASP, you could
specify the Response object, e.g.
source.transformNodeToObject(stylesheet, Response);
However...
> When I run it, I get this error:
>
> The stylesheet does not contain a document element. The stylesheet
may
> be empty, or it may not be a well-formed XML document.
Sounds like the stylesheet wasn't actually loaded into the DOM
successfully.
The .load() method returns a boolean result denoting the success of the
load - you'd be as well to check that result ;)
HTH
Marrow
http://www.marrowsoft.com - home of Xselerator (XSLT IDE and debugger)
http://www.topxml.com/Xselerator
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
|

Cart








