---
title: nodePreserveDTD
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/xmlnode/options/nodepreservedtd
---

# nodePreserveDTD

Specifies that declarations in a DTD should be preserved until it the DTD is modified. For example, parameter entities are by default expanded; with this option, they are written out as they originally occur in the DTD.

## Declaration

```swift
static var nodePreserveDTD: XMLNode.Options { get }
```

## See Also

### Constants

- [documentIncludeContentTypeDeclaration](foundation/xmlnode/options/documentincludecontenttypedeclaration.md)
- [documentTidyHTML](foundation/xmlnode/options/documenttidyhtml.md)
- [documentTidyXML](foundation/xmlnode/options/documenttidyxml.md)
- [documentValidate](foundation/xmlnode/options/documentvalidate.md)
- [documentXInclude](foundation/xmlnode/options/documentxinclude.md)
- [nodeCompactEmptyElement](foundation/xmlnode/options/nodecompactemptyelement.md)
- [nodeExpandEmptyElement](foundation/xmlnode/options/nodeexpandemptyelement.md)
- [nodeIsCDATA](foundation/xmlnode/options/nodeiscdata.md)
- [nodeLoadExternalEntitiesAlways](foundation/xmlnode/options/nodeloadexternalentitiesalways.md)
- [nodeLoadExternalEntitiesNever](foundation/xmlnode/options/nodeloadexternalentitiesnever.md)
- [nodeLoadExternalEntitiesSameOriginOnly](foundation/xmlnode/options/nodeloadexternalentitiessameoriginonly.md)
- [nodeNeverEscapeContents](foundation/xmlnode/options/nodeneverescapecontents.md)
- [nodePreserveAll](foundation/xmlnode/options/nodepreserveall.md)
- [nodePreserveAttributeOrder](foundation/xmlnode/options/nodepreserveattributeorder.md)
- [nodePreserveCDATA](foundation/xmlnode/options/nodepreservecdata.md)
