Skip to content

Instantly share code, notes, and snippets.

@vikaskanani
Created December 13, 2018 09:08
Show Gist options
  • Save vikaskanani/d0186c2af6efddcc7950c898c33cb13b to your computer and use it in GitHub Desktop.
Save vikaskanani/d0186c2af6efddcc7950c898c33cb13b to your computer and use it in GitHub Desktop.
<cfsavecontent variable="xml_stream"><cfoutput><?xml version="1.0" encoding="UTF-8"?>
<shiporder orderid="889923"
xmlns="http://webservice.example.com/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://webservice.example.com/ https://gist.githubusercontent.com/vikaskanani/016522bc8969008e5efdf6770effc430/raw/5eec95f8eb34c538f1cfd1e543b22027e021eafa/ShipOrder.xsd">
<orderperson>John Smith</orderperson>
<shipto>
<name>Ola Nordmann</name>
<address>Langgt 23</address>
<city>4000 Stavanger</city>
<country>Norway</country>
</shipto>
<item>
<title>Empire Burlesque</title>
<note>Special Edition</note>
<quantity>1</quantity>
<price>10.90</price>
</item>
<item>
<title>Hide your heart</title>
<quantity>1</quantity>
<price>9.90</price>
</item>
</shiporder>
</cfoutput>
</cfsavecontent>
<cfset xml_document = xmlparse(xml_stream) />
<cfdump var="#xmlValidate(xml_document)#" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment