---
title: "init(contentsOfURL:options:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/xmldocument/init(contentsofurl:options:)"
---

# init(contentsOfURL:options:)

## Declaration

```swift
convenience init(contentsOfURL url: URL, options mask: XMLNode.Options = []) throws
```
