You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by "De Ridder, Bavo" <BD...@SilverStream.com> on 2002/04/10 08:16:50 UTC

Document on request

Hi,

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.



Bavo De Ridder
Field Application Engineer
Silverstream Software

tel +32 (2) 474 46 11
fax +32 (2) 474 46 95
email mailto:bderidder@silverstream.be
Visit us at http://www.silverstream.com/

      It's all about the golden rule. Who has the gold, makes the rules.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Document on request

Posted by Shawn Bayern <ba...@essentially.net>.
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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>