How to read and parse XML content
Use "xml" directive to read and parse XML documents.
<@xml > Directive syntax
Read XML from a URL :<@xml url="<XML file URL>" var="myxml" > process XML here using Freemarker XML processing </@xml>For more information on Freemarker XML processing.
Read XML from a variable :
<@xml text="<hello>say Hello</hello>" var="root" >
${root.hello}
</@xml>
Remove comments and processing instruction from XML :
<@xml text="<hello>say Hello</hello>" var="root" removeComments=true removeInstructions=true > </@xml>
Demo Application
A XML demo application which shows how to read XML from URL and display in cloudCMS.
blog comments powered by Disqus
Last Modified : Jul 15, 2009 10:03:16 AM