[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: methods of converting an xml string to xml nodes

Subject: Re: methods of converting an xml string to xml nodes
From: Joseph Kesselman <keshlam@xxxxxxxxxx>
Date: Thu, 7 Nov 2002 10:24:36 -0500
convert string to xml node
>I'm using xalan processor. And what I need is to convert
>an xml string to xml nodes so it can be read from stylesheet.

Write an extension function which invokes an XML parser to convert the 
string to DOM nodes, return the top-level node or a DOM NodeList to Xalan, 
and it'll be treated as an XSLT nodeset.

If your string can't be interpreted as a well-formed document, you'll have 
to find a parser which can handle document fragments.

See http://xml.apache.org/xalan-j/extensions.html for more information 
about how to write and invoke Xalan extension functions.


Alternatively: Write an Entity Resolver which recognizes a specific URI as 
a request to read from your string buffer, plug it into the Xalan/Xerces 
system, then use the XSLT document() function to request that URI. This is 
a bit more obscure but may be more efficient since you don't need to take 
the intermediate step of generating the DOM nodes.


______________________________________
Joe Kesselman  / IBM Research

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.