Name
<x:parse>
Synopsis
The <x:parse>
action parses an XML
document and saves the result either
as a standard org.w3c.dom.Document
object or as an
implementation-dependent object.
Syntax 1: Without a body
<x:parse xml="xmlDocument
" [var="var
" [scope="page|request|session|application"] | varDom="var
" [scopeDom="page|request|session|application"]] [systemId="systemId
"] [filter="filter
"] />
Syntax 2: With a body
<x:parse [var="var
" [scope="page|request|session|application"] | varDom="var
" [scopeDom="page|request|session|application"]] [systemId="systemId
"] [filter="filter
"]>xmlDocument
</x:parse>
Attributes
Attribute name |
Java type |
Dynamic value accepted |
Description |
---|---|---|---|
xml |
|
Yes |
The XML document. |
systemId |
|
Yes |
A URI to use as a base for relative references in the document, as an absolute URL, or as a page- or context-relative path. |
filter |
|
Yes |
A filter that can remove elements that aren’t of interest. |
var |
|
No |
The variable name. The type is implementation-dependent. |
scope |
|
No |
The variable scope. |
varDom |
|
No |
The DOM variable name. The type is
|
scope |
|
No |
The DOM variable scope. |
Example
<c:import url="http://meerkat.oreillynet.com/?&p=4999&_fl=xml&t=ALL" varReader="xmlSource"> <x:parse var="doc" xml="${xmlSource}" scope="application" /> </c:import>
Get JavaServer Pages, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.