---
title: CFXMLTreeCreateWithNode
framework: Core Foundation
role: symbol
role_heading: Function
platforms: [macOS 10.0+]
path: corefoundation/cfxmltreecreatewithnode
---

# CFXMLTreeCreateWithNode

Creates a childless, parentless CFXMLTree object node for a CFXMLNode object.

## Declaration

```occ
extern CFXMLTreeRefCFXMLTreeCreateWithNode(CFAllocatorRef allocator, CFXMLNodeRef node);
```

## Parameters

- `allocator`: The allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
- `node`: The CFXMLNode object to use when creating the new CFXMLTree object.

## Return Value

Return Value A CFXMLTree object. Ownership follows the The Create Rule.

## See Also

### CFXMLTree Miscellaneous Functions

- [CFXMLCreateStringByEscapingEntities(_:_:_:)](corefoundation/cfxmlcreatestringbyescapingentities(_:_:_:).md)
- [CFXMLCreateStringByUnescapingEntities(_:_:_:)](corefoundation/cfxmlcreatestringbyunescapingentities(_:_:_:).md)
- [CFXMLTreeCreateFromData](corefoundation/cfxmltreecreatefromdata.md)
- [CFXMLTreeCreateFromDataWithError](corefoundation/cfxmltreecreatefromdatawitherror.md)
- [CFXMLTreeCreateWithDataFromURL](corefoundation/cfxmltreecreatewithdatafromurl.md)
- [CFXMLTreeCreateXMLData](corefoundation/cfxmltreecreatexmldata.md)
- [CFXMLTreeGetNode](corefoundation/cfxmltreegetnode.md)
