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

# CFXMLNodeCreateCopy

Creates a copy of a CFXMLNode object.

## Declaration

```occ
extern CFXMLNodeRefCFXMLNodeCreateCopy(CFAllocatorRef alloc, CFXMLNodeRef origNode);
```

## Parameters

- `alloc`: The allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
- `origNode`: The node to copy. Do not pass NULL.

## Return Value

Return Value A new CFXMLNode object. Ownership follows the The Create Rule.

## See Also

### CFXMLNode Miscellaneous Functions

- [CFXMLNodeCreate](corefoundation/cfxmlnodecreate.md)
- [CFXMLNodeGetInfoPtr](corefoundation/cfxmlnodegetinfoptr.md)
- [CFXMLNodeGetString](corefoundation/cfxmlnodegetstring.md)
- [CFXMLNodeGetTypeCode](corefoundation/cfxmlnodegettypecode.md)
- [CFXMLNodeGetTypeID](corefoundation/cfxmlnodegettypeid.md)
- [CFXMLNodeGetVersion](corefoundation/cfxmlnodegetversion.md)
