<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Technócil &#187; dom</title>
	<atom:link href="http://technocil.com/tag/dom/feed/" rel="self" type="application/rss+xml" />
	<link>http://technocil.com</link>
	<description></description>
	<lastBuildDate>Tue, 24 Aug 2010 21:24:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Leitura de XML &#8211; Parte 1 DOM XML</title>
		<link>http://technocil.com/2008/12/09/leitura-de-xml-parte-1-dom-xml/</link>
		<comments>http://technocil.com/2008/12/09/leitura-de-xml-parte-1-dom-xml/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 15:49:46 +0000</pubDate>
		<dc:creator>João Vagner</dc:creator>
				<category><![CDATA[Desenvolvimento web]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[dom]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://technocil.com/2008/12/09/leitura-de-xml-parte-1-dom-xml/</guid>
		<description><![CDATA[J&#225; precisaram ler algum XML, de algum lugar, trabalhar com esses valores? Se ainda n&#227;o precisaram, podem ter a absoluta convic&#231;&#227;o que esse dia chegar&#225;. 
Alguns aplicativos ja usam o XML como transmiss&#227;o de informa&#231;&#245;es, ou recep&#231;&#227;o de informa&#231;&#245;es. Importar ou exportar um arquivo XML &#233; simples, f&#225;cil e r&#225;pido, basta manter um padr&#227;o para [...]]]></description>
			<content:encoded><![CDATA[<p>J&#225; precisaram ler algum XML, de algum lugar, trabalhar com esses valores? Se ainda n&#227;o precisaram, podem ter a absoluta convic&#231;&#227;o que esse dia chegar&#225;. </p>
<p>Alguns aplicativos ja usam o XML como transmiss&#227;o de informa&#231;&#245;es, ou recep&#231;&#227;o de informa&#231;&#245;es. Importar ou exportar um arquivo XML &#233; simples, f&#225;cil e r&#225;pido, basta manter um padr&#227;o para ler dentro de suas tags ou escrever dentro das mesmas.</p>
<p>Alguns sistemas, blogs, entre outros dispostivos, ja est&#227;o trabalhando totalmente ou parcialmente com XML, cada um usando formata&#231;&#245;es diferentes, por&#233;m a estrutura do arquivo sempre o mesmo com a marca&#231;&#227;o de tags, exemplo de um XML comum de RSS do nosso proprio blog TECHNÓCIL:</p>
<p><strong>Nosso XML:</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;rss</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;2.0&quot;</span> </span>
&nbsp;
<span style="color: #009900;">    <span style="color: #000066;">xmlns:content</span>=<span style="color: #ff0000;">&quot;http://purl.org/rss/1.0/modules/content/&quot;</span> </span>
&nbsp;
<span style="color: #009900;">    <span style="color: #000066;">xmlns:wfw</span>=<span style="color: #ff0000;">&quot;http://wellformedweb.org/CommentAPI/&quot;</span> </span>
&nbsp;
<span style="color: #009900;">    <span style="color: #000066;">xmlns:dc</span>=<span style="color: #ff0000;">&quot;http://purl.org/dc/elements/1.1/&quot;</span> </span>
&nbsp;
<span style="color: #009900;">    <span style="color: #000066;">xmlns:atom</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2005/Atom&quot;</span> </span>
&nbsp;
<span style="color: #009900;">    <span style="color: #000000; font-weight: bold;">&gt;</span></span> 
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;channel<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>technocil.com<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;atom:link</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;http://technocil.com/feed/&quot;</span> <span style="color: #000066;">rel</span>=<span style="color: #ff0000;">&quot;self&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;application/rss+xml&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span> 
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;link<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>http://technocil.com<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/link<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pubDate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Tue, 09 Dec 2008 14:30:28 +0000<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/pubDate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;generator<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>http://wordpress.org/?v=2.6.5<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/generator<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;language<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>en<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/language<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
&nbsp;
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;item<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Primeiro post, Apresentação<span style="color: #ddbb00;">&amp;#8230;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;link<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>http://technocil.com/2008/12/09/primeiro-post-apresentacao/<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/link<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;comments<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>http://technocil.com/2008/12/09/primeiro-post-apresentacao/#comments<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/comments<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pubDate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Tue, 09 Dec 2008 14:29:10 +0000<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/pubDate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dc:creator<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Tobias<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dc:creator<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;category<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><span style="color: #339933;">&lt;![CDATA[Geral]]&gt;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/category<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;category<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><span style="color: #339933;">&lt;![CDATA[Apresentacao]]&gt;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/category<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;category<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><span style="color: #339933;">&lt;![CDATA[Technócil]]&gt;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/category<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;guid</span> <span style="color: #000066;">isPermaLink</span>=<span style="color: #ff0000;">&quot;false&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>http://technocil.com/?p=121<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/guid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><span style="color: #339933;">&lt;![CDATA[nossa descrição do post [...]]]&gt;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/description<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
&nbsp;
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;content:encoded<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><span style="color: #339933;">&lt;![CDATA[&lt;p&gt;Todo Conteudo do post&lt;/p&gt; </span>
&nbsp;
<span style="color: #339933;">&lt;p&gt;Segundo paragrafo&lt;/p&gt;]]&gt;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/content:encoded<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
&nbsp;
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;wfw:commentRss<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>http://technocil.com/2008/12/09/primeiro-post-apresentacao/feed/<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/wfw:commentRss<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
&nbsp;
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/item<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/channel<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/rss<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>Um tanto quanto grande nosso XML n&#233;? Por&#233;m ele &#233; &#243;timo para o exemplo devido aos niveis de title, e description, que ir&#225; nos exemplos abaixo. </p>
<p>Agora imaginem como ler ou obter os dados desse nosso RSS (XML). Para isso existem v&#225;rias maneiras, algumas s&#227;o usando algumas fun&#231;&#245;es do PHP como a <a href="http://br2.php.net/manual/pt_BR/function.file-get-contents.php" target="_blank">file_get_contents</a>. Exemplo:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
&nbsp;
<span style="color: #000088;">$conteudo</span> <span style="color: #339933;">=</span> <span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://technocil.com/feed/'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$conteudo</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Dependendo do seu navegador, o que ser&#225; impresso &#233; RSS(XML) do nosso blog, ou abrindo o c&#243;digo fonte do que for impresso, ver&#225; todo o XML impresso. No meu caso que uso o <a href="http://www.opera.com" target="_blank">Opera</a>, precisarei abrir o c&#243;digo fonte para ver o XML Impresso l&#225;. Agora depois trabalhar com esses dados podem ser por express&#227;o regular, e por ai vai, &#233; um trabalh&#227;o dessa maneira. O XML n&#227;o &#233; dinamico, n&#227;o pode ser interpretado pelo servidor, pode somente ser lido. Para escrever um XML com valores dinamicos sim, se usa usa PHP, e definindo no header o tipo de documento XML, por&#233;m ainda n&#227;o chegamos ao ponto de escrever nenhum XML. </p>
<p><em>Ent&#227;o para fugir do trabalho duro e chato qual a maneira mais f&#225;cil e r&#225;pida de trabalhar com XML e seus valores? </em></p>
<p>S&#227;o as mais conhecidas duas, usando uma extens&#227;o do php chamada <a href="http://www.php.net/dom" target="_blank">DOM XML</a>, que foi revisada no PHP 4.3.0 para trabalhar corretamente com o Padr&#227;o <a href="http://br2.php.net/manual/pt_BR/book.domxml.php" target="_blank">DOM</a>, e segunda op&#231;&#227;o &#233; a <a href="http://www.php.net/simplexml" target="_blank">SimpleXML</a>. </p>
<p>Instala&#231;&#227;o do <strong>DOM XML </p>
<p></strong>A instala&#231;&#227;o &#233; simples, basta<strong> descomentar </strong>a linha do php.ini que possui a extens&#227;o domxml.dll ou .so:</p>
<blockquote>
<p>extension=php_domxml.dll</p>
</blockquote>
<p>No meu caso, como uso o XAMPP 1.6.7, eu comentei a linha, pois a mesma apresentava um erro ao tentar utilizar, e eu apenas comentei e ela voltou a funcionar, no site do PHP Consta alguns avisos de vers&#245;es, dependendo da sua vers&#227;o do php, elas s&#227;o v&#225;lidas ou n&#227;o:</p>
<blockquote>
<p><strong>Nota:</strong> Esta extens&#227;o foi movida para o reposit&#243;rio <a href="http://pecl.php.net/" target="_blank">&#187; PECL</a> e n&#227;o &#233; mais distribuida em conjunto com o PHP a partir do PHP 5.0.0. </p>
<p><strong>Nota:</strong> Esta extens&#227;o n&#227;o est&#225; mais marcada como experimental. Ele ser&#225;, contudo, nunca liberada com PHP 5, e ir&#225; somente ser distribuida com PHP 4. Se voc&#234; precisa de suporte a DOM XML com PHP 5, voc&#234; pode usar a extens&#227;o <a href="http://br2.php.net/manual/pt_BR/book.dom.php" target="_blank">DOM</a>. Esta extens&#227;o domxml n&#227;o &#233; compat&#237;vel com a extens&#227;o <a href="http://br2.php.net/manual/pt_BR/book.dom.php" target="_blank">DOM</a>.</p>
</blockquote>
<p>Alguns servidores web, por&#233;m tem dificuldade em trabalhar com essa biblioteca, um exemplo &#233; a Locaweb (n&#227;o vo divulgar o nome do cliente), que sofreu para que pudessem colocar esse componente t&#227;o simples no servidor. Mas isso vai de cliente a cliente. Eu aproveitando o gancho vou divulgar a <a href="http://www.iw2servers.com.br" target="_blank">IW&#178;</a> onde possui SVN (controle de vers&#227;o), SSH e bibliotecas desses e outros usos liberadas, que hospeda aqui o TECHNOCIL.</p>
<p>Vamos aos c&#243;digos do DOM XML:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//aqui iniciamos o trabalho com o DOM, definindo o cabeçalho como versão do XML 1.0, e trabalhando com o charset em UTF-8;</span>
<span style="color: #000088;">$doc</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> DOMDocument<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'1.0?'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'UTF-8?'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #666666; font-style: italic;">// aqui fazemos o load de todo o conteúdo do XML </span>
<span style="color: #000088;">$doc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">load</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://technocil.com/feed/'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Primeira fase completa, ja pegamos todo o conteudo do XML, ja iniciamos a extens&#227;o do DOM, e ja podemos usar os seus componentes:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//exibe o titulo : technocil.com; pegando da tag title na raiz do XML:     &lt;title&gt;technocil.com&lt;/title&gt;</span>
<span style="color: #000088;">$titulo</span>        <span style="color: #339933;">=</span>    <span style="color: #000088;">$doc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;title&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$titulo</span> <span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Caso eu queira o titulo do post eu tenho que entrar dentro dos niveis do XML:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// observe o item(1); Estamos trabalhando com niveis, parecidos com array, onde temos [0], [1], ['titulo'];</span>
<span style="color: #000088;">$tituloPost</span>        <span style="color: #339933;">=</span>    <span style="color: #000088;">$doc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;title&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #339933;">;</span> 
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$tituloPost</span> <span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Agora vamos pegar a descri&#231;&#227;o do Post: </p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// observe que estamos ainda usando o item(1), ainda estamos em um segundo nivel das marcações</span>
<span style="color: #000088;">$DescricaoPost</span>        <span style="color: #339933;">=</span>    <span style="color: #000088;">$doc</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;description&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">nodeValue</span><span style="color: #339933;">;</span> 
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$DescricaoPost</span> <span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Para ler esse conteudo dinamicamente, pode se trabalhar com foreach, listando nos -&gt;item($i) um valor de listagem contando quantos posts possuem no XML. Agora &#233; s&#243; brincarem ;) </p>
<p>Na parte dois, posto um exemplo de como pegar e trabalhar com os dados de Frete dos Correios, usando o XML de resposta das consultas por URL, e na parte 3, como trabalhar com o SimpleXML, no qual eu considero mais trabalhoso e chato.</p>
<p>At&#233; mais!</p>
]]></content:encoded>
			<wfw:commentRss>http://technocil.com/2008/12/09/leitura-de-xml-parte-1-dom-xml/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
