Whatever message this page gives is out now! Go check it out!
<cfxml variable="MyDoc">
<MyDoc>
<cfif testVar IS True>
<cfoutput>The value of testVar is True.</cfoutput>
<cfelse>
<cfoutput>The value of testVar is False.</cfoutput>
</cfif>
<cfloop index = "LoopCount" from = "1" to = "4">
<childNode>
This is Child node <cfoutput>#LoopCount#.</cfoutput>
</childNode>
</cfloop>
</MyDoc>
</cfxml>
<cfdump var=#MyDoc#>
<cfscript>
MyDoc = XmlNew();
MyDoc.xmlRoot = XmlElemNew(MyDoc,"MyRoot");
if (testVar IS TRUE)
MyDoc.MyRoot.XmlText = "The value of testVar is True.";
else
MyDoc.MyRoot.XmlText = "The value of testVar is False.";
for (i = 1; i LTE 4; i = i + 1)
{
MyDoc.MyRoot.XmlChildren[i] = XmlElemNew(MyDoc,"childNode");
MyDoc.MyRoot.XmlChildren[i].XmlText = "This is Child node " & i &".";
}
</cfscript>
<cfdump var=#MyDoc#>
<cfset myXMLDocument = XmlParse(cfhttp.fileContent)>
<cfset myXMLDocument=XmlParse("C:\temp\myxmldoc.xml" variable="XMLFileText")>
"http://localhost:8500/examples/custorder.dtd")>
<cffile action="write" file="C:\temp\myxmldoc.xml" output="#XMLText#">
<!DOCTYPE ...> declaration by default. This affects both XmlParse() and <cfxml>.If your XML legitimately contains a trusted DOCTYPE declaration, pass ALLOWDOCTYPEDECLARATION=true in parserOptions. Otherwise, keep the default behavior.<!--- Parse trusted XML that contains a DOCTYPE declaration --->
<cfset opts = {
ALLOWDOCTYPEDECLARATION = true,
ALLOWEXTERNALENTITIES = false,
ENTITYEXPANSIONLIMIT = 1000
}>
<cfset myXMLDocument = XmlParse(myXmlString, false, opts)>