> For the complete documentation index, see [llms.txt](https://docs.appstrategy.com/apprules-r-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appstrategy.com/apprules-r-documentation/platform/platform-features/system-settings/data-sources/connection-settings/services/xml/connecting-to-xml-datasources.md).

# Connecting to XML Datasources

After connecting to your data source, set DataModel to more closely match the data representation to the structure of your data.

### Connecting to XML

Below are example connection strings to XML files or streams, using the provider's default data modeling configuration (see below):

| **Service provider**            | **URI formats**                                                                                                                    | **Connection example**                                                                                                                                                                                    |
| ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Local                           | <p>localPath</p><p>file:///localPath/file.xml</p>                                                                                  | URI=C:\folder1\file.xml;                                                                                                                                                                                  |
| HTTP or HTTPS                   | <p><http://remoteStream></p><p><https://remoteStream></p>                                                                          | URI=<http://www.host1.com/streamname1>;                                                                                                                                                                   |
| Amazon S3                       | s3://bucket1/folder1/file.xml                                                                                                      | URI=s3://bucket1/folder1/file.xml; AWSAccessKey=token1; AWSSecretKey=secret1; AWSRegion=OHIO;                                                                                                             |
| Azure Blob Storage              | azureblob://mycontainer/myblob/                                                                                                    | URI=azureblob://mycontainer/myblob; AzureAccount=myAccount; AzureAccessKey=myKey;                                                                                                                         |
| Google Drive                    | gdrive://remotePath/file.xml                                                                                                       | URI=gdrive://folder1/file.xml;InitiateOAuth=GETANDREFRESH;                                                                                                                                                |
| Box                             | box://remotePath/file.xml                                                                                                          | URI=box://folder1/file.xml; InitiateOAuth=GETANDREFRESH;                                                                                                                                                  |
| Dropbox                         | dropbox://remotePath/file.xml                                                                                                      | URI=dropbox://folder1/file.xml; InitiateOAuth=GETANDREFRESH; OAuthClientId=oauthclientid1; OAuthClientSecret=oauthcliensecret1; CallbackUrl=<http://localhost:12345>;                                     |
| Sharepoint                      | sp\://remotePath/file.xml                                                                                                          | URI=sp\://Documents/folder1/file.xml; User=user1; Password=password1; SharepointUrl=<https://subdomain.sharepoint.com>;                                                                                   |
| FTP or FTPS                     | <p>ftp\://server:port/remotePath/file.xml</p><p> ftps\://server:port/remotepath/file.xml</p>                                       | URI=ftps\://localhost:990/folder1/file.xml; User=user1; Password=password1;                                                                                                                               |
| AzureDataLakeStoreGen2          | <p>abfs\://myfilesystem/remotePath/file.xml</p><p> abfss\://myfilesystem\@accountName.dfs.core.windows.net/remotepath/file.xml</p> | <p>URI=abfs\://myfilesystem/folder1/file.xml; AzureAccount=myAccount; AzureAccessKey=myKey;</p><p> URI=abfss\://myfilesystem\@myAccount.dfs.core.windows.net/folder1/file.xml; AzureAccessKey=myKey;</p>  |
| AzureDataLakeStoreGen2 with SSL | <p>abfss\://myfilesystem/remotePath/file.xml</p><p> abfs\://myfilesystem\@accountName.dfs.core.windows.net/remotepath/file.xml</p> | <p>URI=abfss\://myfilesystem/folder1/file.xml; AzureAccount=myAccount; AzureAccessKey=myKey;</p><p> URI=abfss\://myfilesystem\@myAccount.dfs.core.windows.net/folder1/file.xml; AzureAccessKey=myKey;</p> |
| Wasabi                          | wasabi://bucket/remotePath/file.xml                                                                                                | URI=wasabi://bucket/folder1/file.xml; AWSAccessKey=token1; AWSSecretKey=secret1; AWSRegion=NorthenVirginia;                                                                                               |

### Modeling XML Data

The DataModel property is the controlling property over how your data is represented into tables and toggles the following basic configurations.

* **Document** (default): Model a top-level, document view of your XML data. The provider returns nested elements as aggregated XML.
* **FlattenedDocuments**: Detect nested documents and implicitly join them into a single table.
* **Relational**: Return individual, related tables from hierarchical data. The tables contain a primary key and a foreign key that links to the parent document.

See [Parsing Hierarchical Data](https://docs.appstrategy.com/apprules-r-documentation/platform/platform-features/system-settings/data-sources/connection-settings/services/xml/parsing-hierarchical-data.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.appstrategy.com/apprules-r-documentation/platform/platform-features/system-settings/data-sources/connection-settings/services/xml/connecting-to-xml-datasources.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
