---
sourceDocument: Yokohama Platform security
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/yokohama/platform-security

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama Platform security

ft:clusterId :

    - psec

bundleId :

    - psec

workflow :

    - Platform


---

# XMLContent

# XMLContent {#ariaid-title1}

Release version: Yokohama  
Updated January 30, 2025  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read  
A global object that provides methods to iterate over the XML content.

You can access an XMLContent object by calling [getAsXmlContent()](https://servicenow-prod.fluidtopics.net/KKef~szjjWXTQojUIdhGng#r_RQST-getAsXmlContent "Returns the request content as an iterable object of type XMLContent.") on a request object.

You access XML data in a [POST or URL parameter](https://servicenow-prod.fluidtopics.net/DxbwCwb2w4p7aN5aD0MKYw#param-apis "POST and URL parameters can be accessed as properties of the request object using request.postParams and request.urlParams.")
by calling `request.postParams.<parameter name>.getAsXmlContent()` or
`request.urlParams.<parameter name>.getAsXmlContent()`.

## XMLContent - getIterator() {#ariaid-title2}

Returns an XMLElementIterator object for the XML
content.
{#r_XMLC-getIterator__table_a1z_sgt_st__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 1. Parameters]

{#r_XMLC-getIterator__table_a1z_sgt_st} {#r_XMLC-getIterator__table_b1z_sgt_st__entry__2}

| Type | Description |
|-|-|
| XMLElementIterator | An object that can be used to iterate over elements in the XMLContent object. |
[Table 2. Returns]

{#r_XMLC-getIterator__table_b1z_sgt_st}

## XMLContent - getIterator(String xPath) {#ariaid-title3}

Returns an XMLElementIterator object for the XML content based on
the specified parameter.
{#r_XMLC-getIterator_S__table_t4j_mlt_st__entry__3}

| Name | Type | Description |
|-|-|-|
| xPath | String | An xPath-like expression that specifies where in the XMLContent object to start. |
[Table 3. Parameters]

{#r_XMLC-getIterator_S__table_t4j_mlt_st} {#r_XMLC-getIterator_S__table_u4j_mlt_st__entry__2}

| Type | Description |
|-|-|
| XMLElementIterator | An object that can be used to iterate over elements in the XMLContent object. |
[Table 4. Returns]

{#r_XMLC-getIterator_S__table_u4j_mlt_st}

