+Ext.data.XmlWriter = function(params) {
+ Ext.data.XmlWriter.superclass.constructor.apply(this, arguments);
+ this.tpl = new Ext.XTemplate(this.tpl).compile();
+};
+Ext.extend(Ext.data.XmlWriter, Ext.data.DataWriter, {
+ <div id="cfg-Ext.data.XmlWriter-root"></div>/**
+ * @cfg {String} root [records] The name of the root element when writing <b>multiple</b> records to the server. Each
+ * xml-record written to the server will be wrapped in an element named after {@link Ext.data.XmlReader#record} property.
+ * eg:
+<code><pre>
+<?xml version="1.0" encoding="UTF-8"?>
+<user><first>Barney</first></user>
+</code></pre>
+ * However, when <b>multiple</b> records are written in a batch-operation, these records must be wrapped in a containing
+ * Element.
+ * eg:
+<code><pre>
+<?xml version="1.0" encoding="UTF-8"?>
+ <records>
+ <first>Barney</first></user>
+ <records><first>Barney</first></user>
+ </records>
+</code></pre>
+ * Defaults to <tt>records</tt>
+ */
+ root: 'records',
+ <div id="cfg-Ext.data.XmlWriter-xmlVersion"></div>/**
+ * @cfg {String} xmlVersion [1.0] The <tt>version</tt> written to header of xml documents.
+<code><pre><?xml version="1.0" encoding="ISO-8859-15"?></pre></code>
+ */
+ xmlVersion : '1.0',
+ <div id="cfg-Ext.data.XmlWriter-xmlEncoding"></div>/**
+ * @cfg {String} xmlEncoding [ISO-8859-15] The <tt>encoding</tt> written to header of xml documents.
+<code><pre><?xml version="1.0" encoding="ISO-8859-15"?></pre></code>
+ */
+ xmlEncoding: 'ISO-8859-15',
+ <div id="cfg-Ext.data.XmlWriter-tpl"></div>/**
+ * @cfg {String} tpl The xml template. Defaults to
+<code><pre>
+<?xml version="{version}" encoding="{encoding}"?>
+ <tpl if="{[values.nodes.length>1]}"><{root}}>',
+ <tpl for="records">
+ <{parent.record}>
+ <tpl for="fields">
+ <{name}>{value}</{name}>
+ </tpl>
+ </{parent.record}>
+ </tpl>
+ <tpl if="{[values.records.length>1]}"></{root}}></tpl>
+</pre></code>
+ */
+ // Break up encoding here in case it's being included by some kind of page that will parse it (eg. PHP)
+ tpl: '<tpl for="."><' + '?xml version="{version}" encoding="{encoding}"?' + '><tpl if="documentRoot"><{documentRoot}><tpl for="baseParams"><tpl for="."><{name}>{value}</{name}</tpl></tpl></tpl><tpl if="records.length>1"><{root}></tpl><tpl for="records"><{parent.record}><tpl for="."><{name}>{value}</{name}></tpl></{parent.record}></tpl><tpl if="records.length>1"></{root}></tpl><tpl if="documentRoot"></{documentRoot}></tpl></tpl>',
+