---
title: "CFPropertyListCreateXMLData(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfpropertylistcreatexmldata(_:_:)"
---

# CFPropertyListCreateXMLData(_:_:)

Creates an XML representation of the specified property list.

## Declaration

```swift
func CFPropertyListCreateXMLData(_ allocator: CFAllocator!, _ propertyList: CFPropertyList!) -> Unmanaged<CFData>!
```

## Parameters

- `allocator`: The allocator to use to allocate memory for the new data object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
- `propertyList`: The property list to convert. This may be any of the standard property list objects, for example a CFArray or a CFDictionary object.

## Return Value

Return Value A CFData object containing the XML data. Ownership follows the The Create Rule.

## Discussion

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

## See Also

### Exporting a Property List

- [CFPropertyListCreateData(_:_:_:_:_:)](corefoundation/cfpropertylistcreatedata(_:_:_:_:_:).md)
- [CFPropertyListWrite(_:_:_:_:_:)](corefoundation/cfpropertylistwrite(_:_:_:_:_:).md)
- [CFPropertyListWriteToStream(_:_:_:_:)](corefoundation/cfpropertylistwritetostream(_:_:_:_:).md)
