---
title: "CFPropertyListCreateFromXMLData(_:_:_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfpropertylistcreatefromxmldata(_:_:_:_:)"
---

# CFPropertyListCreateFromXMLData(_:_:_:_:)

Creates a property list using the specified XML or binary property list data.

## Declaration

```swift
func CFPropertyListCreateFromXMLData(_ allocator: CFAllocator!, _ xmlData: CFData!, _ mutabilityOption: CFOptionFlags, _ errorString: UnsafeMutablePointer<Unmanaged<CFString>?>!) -> Unmanaged<CFPropertyList>!
```

## Parameters

- `allocator`: The allocator to use to allocate memory for the new property list. Pass NULL or kCFAllocatorDefault to use the current default allocator.
- `xmlData`: The raw bytes to convert into a property list. The bytes may be the content of an XML file or of a binary property list (see doc://com.apple.corefoundation/documentation/CoreFoundation/CFPropertyListFormat).
- `mutabilityOption`: A constant that specifies the degree of mutability for the returned property list. See doc://com.apple.corefoundation/documentation/CoreFoundation/property_list_mutability_options for descriptions of possible values.
- `errorString`: On return, NULL if the conversion is successful, otherwise a string that describes the nature of the error. Error messages are not localized, but may be in the future, so they are not currently suitable for comparison. Pass NULL if you do not wish to receive an error string. Ownership follows the https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html#//apple_ref/doc/uid/20001148-103029.

## Return Value

Return Value A new property list if the conversion is successful, otherwise NULL. Ownership follows the The Create Rule.

## Discussion

Discussion warning: This function is obsolete and will be deprecated soon. Use CFPropertyListCreateWithData(_:_:_:_:_:) instead.

## See Also

### Creating a Property List

- [CFPropertyListCreateWithData(_:_:_:_:_:)](corefoundation/cfpropertylistcreatewithdata(_:_:_:_:_:).md)
- [CFPropertyListCreateWithStream(_:_:_:_:_:_:)](corefoundation/cfpropertylistcreatewithstream(_:_:_:_:_:_:).md)
- [CFPropertyListCreateDeepCopy(_:_:_:)](corefoundation/cfpropertylistcreatedeepcopy(_:_:_:).md)
- [CFPropertyListCreateFromStream(_:_:_:_:_:_:)](corefoundation/cfpropertylistcreatefromstream(_:_:_:_:_:_:).md)
