On Wed, 10 Apr 2002, De Ridder, Bavo wrote: > If I look at the xtags library, I think to understand that the xml can > come from either a local file, url or the body of the <parse> tag. > What if I use struts and the XML document is stored in a scope > (request)? How can I do this with xtags? My current solution would be > to patch the parse tag.
If you use JSTL instead of XTags (which indeed influenced the design of JSTL's XML-manipulation tags), you can retrieve a document from the request scope using the expression language. For instance, if the document is stored as a string of XML text, you could write <x:parse var="parsed" xmlText="${request.myXmlDocument}"/> If the data is stored as a DOM, you can jump right in and point to the document directly. E.g., -- <x:out value="$request:myXmlDocument/root//child[2]"/> JSTL is available from the same jakarta.apache.org/taglibs site as XTags. -- Shawn Bayern Author, "JSP Standard Tag Library" http://www.jstlbook.com (coming this summer from Manning Publications) -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>