## XML Parameter

XML variables are initialized as a result of searching a request for user specified criteria.Any pattern appearing with in the XML node would be used to initialize the value of XML variable.

### Parameter Details

- Parameter Name : This is the name of XML variable being defined. It's a mandatory field. This name must be unique among all parameters in the service.
- XML Node Path : Specify the full path of the node which value we need to fetch. For example in below XML user need to get the value of node 'referringId' then XML Node Path should be

<soapenv:Envelope>
<soapenv:Body><prepareOrder><in><header><referringId>.
Complete path of any node can be set using "Set XML
Node Path" button that is explained below:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<prepareOrder ordlink="http://www.mst.macys.com/xsd/order">
<in>
<header varhdr="Xml_Header">
<referringId>271</referringId>
<partnerOrderId>2159013153</partnerOrderId>
</header>
</in>
</prepareOrder>
</soapenv:Body>
</soapenv:Envelope>

- Occurrence Count : It is required if multiple occurrence found of specified node. User has three options for this.
  - Index : By selecting this user can define which index of occurrence need to pick.
  - All : If user will select this option then system will take all occurrence of the specified node.
  - Any : It will take randomly any one occurrence out of all.
- Conversion : This option is used to encode search pattern. It has three options.
  - None : In this option no encoding will apply.
  - HTMLToURL : It will convert HTML-encoded data to a URL-encoded data.
- Value Type : It will specify that the value of parameter is node value or attribute value. It has two options.
  - Node Value : In this options system will get the value of node. For example if XML Node Path is <soapenv:Envelop><soapenv:Body><in><header><referringId> with 'Node Value' option then it will get the value 271.
  - Attribute Value : In this options system will ask for the attribute name and will get the value of specified attribute.For example if XML Node Path is <soapenv:Envelope><soapenv:Body><prepareOrder> with 'Attribute Value' option and Attribute name is 'ordlink' then it will get the value "http://www.mst.macys.com/xsd/order".
- Character(s) in the beginning of request are not part of XML : This option is used to provide the no of characters that is not a part of xml request and are coming in the beginning of request.
- Character(s) at end of request are not part of XML : This option is used to give the provide of characters that is not a part of xml request and are coming in the end of request.
- Node selection criteria (Where Clause) : Argument specifies the qualifiers/clauses. These are particularly useful when NODE occurs multiple times but may also be used to make sure that Node value is assigned only when certain condition is matched. When multiple WHERE arguments are present, all WHERE qualifiers/clauses should be satisfied WHERE argument has the form WHERE=type=value.Two options are applicable for where clause
  - None : Nothing to node selection criteria.
  - Specified : Type can take following forms:Node value like Natraj i.e.: WHERE= <>="Natraj" Attribute, attribute name in angular braces specify the attribute value.
  Value should be specified in double quotes. If the values contain a double quote (").

## Sample Request

- Sample Request for Template Name : Here user can view sample request contents of any template by selecting in to a dropdown. We are showing the sample request here to help user to specify the node/attribute.
  - Beautify :It is used for formatting or beautifying the sample requests and response templates in a well-structured format.
- Set XML Node Path : This button is to help user to get the complete path of the node and set in to XML Node Path by selecting any node. For example if user selects 'partnerOrderId' node and clicks on this button then complete path of this node '<soapenv:Envelope><soapenv:Body><prepareOrder><in><header> <referringId>' will automatically set in to XML Node Path.
- Set Attribute Name : This button is to set the attribute name by selecting it in the sample request content
  - Auto Wrap :It wraps the sample request data of the template automatically. This feature is used for formatting purposes only.