Paraming ColdFusion XML Documents With CFParam

<!--- Create an XML document. --->
<cfxml variable="xmlGirl">
 
	<girl>
		<name>Libby</name>
		<height>5'7"</height>
	</girl>
 
</cfxml>
 
 
<!---
	Param nodes in the XML document that we expect to exist.
	We can do this to make sure an XML response is always
	presented in uniformity.
--->
<cfparam
	name="xmlGirl.girl.hair"
	type="xml"
	default="#XmlElemNew( xmlGirl, 'hair' )#"
	/>
 
 
<!--- Output new XML document structure. --->
<cfdump
	var="#xmlGirl#"
	label="XML After CFParam"
	/>

For Cut-and-Paste