Citrix Systems Network Router 9.2 ユーザーズマニュアル

ページ / 302
138
Citrix NetScaler Policy Configuration and Reference Guide
text.XPATH_JSON(xpathex) 
Operate on a JSON file and return a node-set 
or a string. Node-sets are converted to 
corresponding strings by using the standard 
XPath string conversion routine. 
For example, consider the following JSON 
file:
{ "Book":{ "creator":{ "person":{ 
"name":'<name>' } }, "title":'<title>' } }
The following expression selects all the nodes 
that are enclosed by “/Book" (a node-set) in 
the first 1000 bytes of the body of the JSON 
file and returns the corresponding string 
value, which is "<name><title>":
HTTP.REQ.BODY(1000).XPATH_
JSON(xp%/Book%) 
Parameters: 
xpathex - XPath expression 
text.XPATH_JSON_WITH_
MARKUP(xpathex) 
Operate on an XML file and return a string 
that contains the entire portion of the 
document for the result node, including 
markup such as including the enclosing 
element tags.
For example, consider the following JSON 
file:
{"Book":{ "creator":{ "person":{ 
"name":'<name>' } }, "title":'<title>' } } 
The following expression operates on the 
JSON file and selects all the nodes that are 
enclosed by “/Book/creator" in the first 1000 
bytes of the body, which is “creator:{ person:{ 
name:'<name>' } }.” 
HTTP.REQ.BODY(1000).XPATH_JSON_
WITH_MARKUP(xp%/Book/creator%) 
The portion of the JSON body that is selected 
by the expression is marked for further 
processing.
Parameters: 
xpathex - XPath expression
XPath Prefix
Description