<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; html+xml в Fifefox]]></title>
		<link>http://forum.script-coding.com/viewtopic.php?id=8479</link>
		<atom:link href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=8479&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «html+xml в Fifefox».]]></description>
		<lastBuildDate>Mon, 15 Jul 2013 10:03:48 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: html+xml в Fifefox]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=73784#p73784</link>
			<description><![CDATA[<div class="quotebox"><cite>DnsIs пишет:</cite><blockquote><p>Есть некие данные, большей частью в xml и немного в txt. Хотел сконвертить все в один xml и иногда посматривать их. Хотя правильнее неверное xml+xsl, ага?</p></blockquote></div><p>Возможно. Мне нравятся xsl преобразования (по крайней мере несложные мне удается реализовать так, чтобы &quot;нравится&quot; преобладало над &quot;не нравится&quot;), но иногда я пользуюсь и простой текстовой обработкой вида:<br /></p><div class="codebox"><pre><code>
perl -pe &#039;s/&gt;&lt;/&gt;\n&lt;/g&#039; filename | grep &#039;&lt;tagname&#039;
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Rumata)]]></author>
			<pubDate>Mon, 15 Jul 2013 10:03:48 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=73784#p73784</guid>
		</item>
		<item>
			<title><![CDATA[Re: html+xml в Fifefox]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=73783#p73783</link>
			<description><![CDATA[<p>Стыдно мне.</p><p>Кучу примеров перепробовал и забыл, что xml файл из другого источника.<br />Спасибо.</p><br /><div class="quotebox"><cite>Rumata пишет:</cite><blockquote><p>В чем смысл нестандартного решения? Чем оно лучше обычной обработки XML?</p></blockquote></div><p>А фиг его знает.<br />Есть некие данные, большей частью в xml и немного в txt. Хотел сконвертить все в один xml и иногда посматривать их. Хотя правильнее неверное xml+xsl, ага?</p>]]></description>
			<author><![CDATA[null@example.com (DnsIs)]]></author>
			<pubDate>Mon, 15 Jul 2013 09:39:20 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=73783#p73783</guid>
		</item>
		<item>
			<title><![CDATA[Re: html+xml в Fifefox]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=73780#p73780</link>
			<description><![CDATA[<p>Надо бы и код под себя править : )<br /></p><div class="codebox"><pre><code>
// своия структура документа, свои теги, свое пространство имен
function runDemo()
{
    var doc = document.getElementById(&quot;purchase-order&quot;).contentDocument;
    var names = doc.getElementsByTagNameNS(&quot;&quot;, &quot;name&quot;);
    var result = [];
    Array.forEach(names, function(v)
    {
        result.push(v.textContent);
    });
    document.getElementById(&quot;output-box&quot;).innerHTML = result.join(&#039;&lt;br /&gt;&#039;);
}
</code></pre></div><p>В чем смысл нестандартного решения? Чем оно лучше обычной обработки XML?</p>]]></description>
			<author><![CDATA[null@example.com (Rumata)]]></author>
			<pubDate>Mon, 15 Jul 2013 09:11:06 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=73780#p73780</guid>
		</item>
		<item>
			<title><![CDATA[html+xml в Fifefox]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=73778#p73778</link>
			<description><![CDATA[<p>Доброго утра.</p><p>Прочел <a href="https://developer.mozilla.org/en-US/docs/Using_XML_Data_Islands_in_Mozilla">Using XML Data Islands in Mozilla | MDN</a>. Вытащил куски.</p><p><strong>equip.html</strong><br /></p><div class="codebox"><pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;XML Data Block Demo&lt;/title&gt;
&lt;script&gt;
function runDemo() {
  var doc = document.getElementById(&quot;purchase-order&quot;).contentDocument;
  var lineItems = doc.getElementsByTagNameNS(&quot;http://example.mozilla.org/PurchaseOrderML&quot;, &quot;lineItem&quot;);
  var firstPrice = lineItems[0].getElementsByTagNameNS(&quot;http://example.mozilla.org/PurchaseOrderML&quot;, &quot;price&quot;)[0].textContent;
  document.getElementById(&quot;output-box&quot;).textContent = &quot;The purchase order contains &quot; + lineItems.length + &quot; line items. The price of the first line item is &quot; + firstPrice + &quot;.&quot;;
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body onload=&quot;runDemo()&quot;;&gt;
    &lt;object id=&quot;purchase-order&quot; data=&quot;equip.xml&quot; type=&quot;text/xml&quot; style=&quot;display: none;&quot;&gt;&lt;/object&gt;
    &lt;div id=&quot;output-box&quot;&gt;Demo did not run&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre></div><p><strong>equip.xml</strong><br /></p><div class="codebox"><pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;windows-1251&quot;?&gt;
&lt;equipment&gt;
    &lt;details&gt;
        &lt;name&gt;Hard Disk&lt;/name&gt;
        &lt;rate&gt;2800&lt;/rate&gt;
        &lt;manufacturer&gt;SeaGate&lt;/manufacturer&gt;  
    &lt;/details&gt;

    &lt;details&gt;
        &lt;name&gt;Motherboard&lt;/name&gt;
        &lt;rate&gt;10000&lt;/rate&gt;
        &lt;manufacturer&gt;Intel&lt;/manufacturer&gt;  
    &lt;/details&gt;
    
    &lt;details&gt;
        &lt;name&gt;Monitor&lt;/name&gt;
        &lt;rate&gt;8000&lt;/rate&gt;
        &lt;manufacturer&gt;Samsung&lt;/manufacturer&gt;  
    &lt;/details&gt;
    
    &lt;details&gt;
        &lt;name&gt;Rajadurai&lt;/name&gt;
        &lt;rate&gt;Tuticorin&lt;/rate&gt;
        &lt;manufacturer&gt;Tamilnad&lt;/manufacturer&gt;  
    &lt;/details&gt;
&lt;/equipment&gt;</code></pre></div><p>Не подскажете, от чего не пашет?</p><br /><p>Спасибо.</p>]]></description>
			<author><![CDATA[null@example.com (DnsIs)]]></author>
			<pubDate>Mon, 15 Jul 2013 08:46:52 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=73778#p73778</guid>
		</item>
	</channel>
</rss>
