<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Undocumented XML functionality	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/undocumented-xml-functionality/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/undocumented-xml-functionality?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=undocumented-xml-functionality</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Thu, 02 Feb 2012 00:47:54 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
	<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/undocumented-xml-functionality#comment-73071</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Thu, 02 Feb 2012 00:47:54 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=751#comment-73071</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/undocumented-xml-functionality#comment-73029&quot;&gt;James Myatt&lt;/a&gt;.

@James - I don&#039;t have an immediate answer for you, it requires some investigation. This sounds like a good idea for a future article. If you cannot wait for this article to appear, you could contact me by email (link at the top right of this page) to discuss a short consulting gig.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/undocumented-xml-functionality#comment-73029">James Myatt</a>.</p>
<p>@James &#8211; I don&#8217;t have an immediate answer for you, it requires some investigation. This sounds like a good idea for a future article. If you cannot wait for this article to appear, you could contact me by email (link at the top right of this page) to discuss a short consulting gig.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: James Myatt		</title>
		<link>https://undocumentedmatlab.com/articles/undocumented-xml-functionality#comment-73029</link>

		<dc:creator><![CDATA[James Myatt]]></dc:creator>
		<pubDate>Wed, 01 Feb 2012 12:10:10 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=751#comment-73029</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/undocumented-xml-functionality#comment-72787&quot;&gt;Yair Altman&lt;/a&gt;.

@Yair, That certainly sounds like a better idea, but I&#039;m not sure how to proceed. Could you indicate how to modify the parseXML function from the xmlread help so that it used the SAX parser rather than the DOM returned by xmlread? Or am I on the wrong track?]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/undocumented-xml-functionality#comment-72787">Yair Altman</a>.</p>
<p>@Yair, That certainly sounds like a better idea, but I&#8217;m not sure how to proceed. Could you indicate how to modify the parseXML function from the xmlread help so that it used the SAX parser rather than the DOM returned by xmlread? Or am I on the wrong track?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/undocumented-xml-functionality#comment-72787</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Mon, 30 Jan 2012 22:42:18 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=751#comment-72787</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/undocumented-xml-functionality#comment-72783&quot;&gt;James Myatt&lt;/a&gt;.

@James - DOM is normally used for small XML models; SAX is usually better for large models that can be processed sequentially. There are numerous SAX parsers available online that you can use in Matlab. Perhaps the most widely used open-source XML parser, which includes support fro both SAX and DOM, is Xerces, which is already pre-bundled in Matlab (take a look at the &lt;i&gt;%matlabroot%/java/jarext/&lt;/i&gt; folder), so you can use it in Matlab out-of-the-box. Other well-known XML support packages, namely Xalan and Saxon, are also pre-bundled.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/undocumented-xml-functionality#comment-72783">James Myatt</a>.</p>
<p>@James &#8211; DOM is normally used for small XML models; SAX is usually better for large models that can be processed sequentially. There are numerous SAX parsers available online that you can use in Matlab. Perhaps the most widely used open-source XML parser, which includes support fro both SAX and DOM, is Xerces, which is already pre-bundled in Matlab (take a look at the <i>%matlabroot%/java/jarext/</i> folder), so you can use it in Matlab out-of-the-box. Other well-known XML support packages, namely Xalan and Saxon, are also pre-bundled.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: James Myatt		</title>
		<link>https://undocumentedmatlab.com/articles/undocumented-xml-functionality#comment-72783</link>

		<dc:creator><![CDATA[James Myatt]]></dc:creator>
		<pubDate>Mon, 30 Jan 2012 21:46:58 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=751#comment-72783</guid>

					<description><![CDATA[xmlread does a great job of parsing an XML file, but I&#039;ve found that actually extracting data from the DOM hierarchy is pretty slow. For example, the parseXML function in the xmlread help takes about 250 times longer than the call to xmlread itself and vast majority of that time is spent interrogating the DOM objects.

Do you have any suggestions?]]></description>
			<content:encoded><![CDATA[<p>xmlread does a great job of parsing an XML file, but I&#8217;ve found that actually extracting data from the DOM hierarchy is pretty slow. For example, the parseXML function in the xmlread help takes about 250 times longer than the call to xmlread itself and vast majority of that time is spent interrogating the DOM objects.</p>
<p>Do you have any suggestions?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/undocumented-xml-functionality#comment-4530</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Sat, 21 Nov 2009 16:36:23 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=751#comment-4530</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/undocumented-xml-functionality#comment-4491&quot;&gt;Donn Shull&lt;/a&gt;.

Here&#039;s a nicer &quot;pretty-print&quot;, which uses the undocumented InputSource input argument format of &lt;b&gt;&lt;i&gt;xlswrite&lt;/i&gt;&lt;/b&gt;:

&lt;pre lang=&quot;matlab&quot;&gt;
fReader=java.io.FileReader(java.io.File(which(&#039;info.xml&#039;)));
xmlwrite(org.xml.sax.InputSource(fReader))
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/undocumented-xml-functionality#comment-4491">Donn Shull</a>.</p>
<p>Here&#8217;s a nicer &#8220;pretty-print&#8221;, which uses the undocumented InputSource input argument format of <b><i>xlswrite</i></b>:</p>
<pre lang="matlab">
fReader=java.io.FileReader(java.io.File(which('info.xml')));
xmlwrite(org.xml.sax.InputSource(fReader))
</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Donn Shull		</title>
		<link>https://undocumentedmatlab.com/articles/undocumented-xml-functionality#comment-4491</link>

		<dc:creator><![CDATA[Donn Shull]]></dc:creator>
		<pubDate>Fri, 20 Nov 2009 17:58:22 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=751#comment-4491</guid>

					<description><![CDATA[Hi Yair,

It seems that many people follow an unusal convention for the format of their xml files. Even The MathWork&#039;s info.xml files don&#039;t following the standard indented form for xml files. A quick way to &quot;pretty print&quot; an xml file is to use saveXML method of the DOM node ie:

&lt;pre lang=&quot;matlab&quot;&gt;
x = xmlread(which(&#039;info.xml&#039;));
x.saveXML(x.getDocumentElement)
&lt;/pre&gt;

Thanks for the good work,

Donn]]></description>
			<content:encoded><![CDATA[<p>Hi Yair,</p>
<p>It seems that many people follow an unusal convention for the format of their xml files. Even The MathWork&#8217;s info.xml files don&#8217;t following the standard indented form for xml files. A quick way to &#8220;pretty print&#8221; an xml file is to use saveXML method of the DOM node ie:</p>
<pre lang="matlab">
x = xmlread(which('info.xml'));
x.saveXML(x.getDocumentElement)
</pre>
<p>Thanks for the good work,</p>
<p>Donn</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
