CFXMLTreeCreateXMLData
Generates an XML document from a CFXMLTree object which is ready to be written to permanent storage.
Declaration
extern CFDataRef CFXMLTreeCreateXMLData(CFAllocatorRef allocator, CFXMLTreeRef xmlTree);Parameters
- allocator:
The allocator to use to allocate memory for the new object. Pass
NULLor kCFAllocatorDefault to use the current default allocator. - xmlTree:
The CFXMLTree object you wish to convert to an XML document.
Return Value
The XML data. Ownership follows the The Create Rule.
Discussion
This function will not regenerate entity references replaced at the parse time (except those required for syntactic correctness). If you need this you must manually walk the tree and re-insert any entity references that should appear in the final output file.