<?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: How To Extract HTML Tags And Their Attributes With PHP</title>
	<atom:link href="http://w-shadow.com/blog/2009/10/20/how-to-extract-html-tags-and-their-attributes-with-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://w-shadow.com/blog/2009/10/20/how-to-extract-html-tags-and-their-attributes-with-php/</link>
	<description>A blog about web development, software business, and WordPress</description>
	<lastBuildDate>Tue, 22 May 2012 04:00:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Jānis Elsts</title>
		<link>http://w-shadow.com/blog/2009/10/20/how-to-extract-html-tags-and-their-attributes-with-php/comment-page-1/#comment-199725</link>
		<dc:creator>Jānis Elsts</dc:creator>
		<pubDate>Mon, 23 Apr 2012 14:36:08 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/?p=1375#comment-199725</guid>
		<description>Oh, you mean nested tags? Yes, the extract_tags() function doesn&#039;t handle that very well. Try using the DOM API instead.</description>
		<content:encoded><![CDATA[<p>Oh, you mean nested tags? Yes, the extract_tags() function doesn&#8217;t handle that very well. Try using the DOM API instead.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlo</title>
		<link>http://w-shadow.com/blog/2009/10/20/how-to-extract-html-tags-and-their-attributes-with-php/comment-page-1/#comment-199717</link>
		<dc:creator>Carlo</dc:creator>
		<pubDate>Mon, 23 Apr 2012 09:10:46 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/?p=1375#comment-199717</guid>
		<description>oops sorry! the code: &lt;span class=&quot;any&quot;&gt;my tesxt very &lt;span title=&quot;mytitle&quot;&gt;is&lt;/span&gt; cool&lt;/span&gt; 
alternatively Here the simple code: http://www.donaticarlo.it/span.html</description>
		<content:encoded><![CDATA[<p>oops sorry! the code: &lt;span class=&#8221;any&#8221;&gt;my tesxt very &lt;span title=&#8221;mytitle&#8221;&gt;is&lt;/span&gt; cool&lt;/span&gt;<br />
alternatively Here the simple code: <a href="http://www.donaticarlo.it/span.html" rel="nofollow">http://www.donaticarlo.it/span.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jānis Elsts</title>
		<link>http://w-shadow.com/blog/2009/10/20/how-to-extract-html-tags-and-their-attributes-with-php/comment-page-1/#comment-199685</link>
		<dc:creator>Jānis Elsts</dc:creator>
		<pubDate>Fri, 20 Apr 2012 17:35:22 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/?p=1375#comment-199685</guid>
		<description>@Carlo: 

Looks like the comment form ate your tags; try replacing &gt; and &lt; with the corresponding HTML entities (&gt; and &lt;) to prevent that. Alternatively, upload your code somewhere and post a link.

@Luca: 

One way to retrieve all tags would be to call $dom-&gt;getElementsByTagName(&#039;*&#039;). See the &lt;a href=&quot;http://www.php.net/manual/en/domdocument.getelementsbytagname.php&quot; rel=&quot;nofollow&quot;&gt;getElementsByTagName documentation&lt;/a&gt; for details on how this works.</description>
		<content:encoded><![CDATA[<p>@Carlo: </p>
<p>Looks like the comment form ate your tags; try replacing &gt; and &lt; with the corresponding HTML entities (&amp;gt; and &amp;lt;) to prevent that. Alternatively, upload your code somewhere and post a link.</p>
<p>@Luca: </p>
<p>One way to retrieve all tags would be to call $dom-&gt;getElementsByTagName(&#8216;*&#8217;). See the <a href="http://www.php.net/manual/en/domdocument.getelementsbytagname.php" rel="nofollow">getElementsByTagName documentation</a> for details on how this works.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luca</title>
		<link>http://w-shadow.com/blog/2009/10/20/how-to-extract-html-tags-and-their-attributes-with-php/comment-page-1/#comment-199680</link>
		<dc:creator>Luca</dc:creator>
		<pubDate>Fri, 20 Apr 2012 16:10:48 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/?p=1375#comment-199680</guid>
		<description>Hi and thanks for your great tip &amp; code. I would like to know if there&#039;s a way with DOMDocument to extract all the tags used in a document. I have a field in which the user can add some html code, but only a few tags are allowed, I don&#039;t know in advance which tags the user will insert, so if I could have an array of the all the tags he/she used in the html code, I would know if he/she used some not allowed tag. Thanks in advance</description>
		<content:encoded><![CDATA[<p>Hi and thanks for your great tip &amp; code. I would like to know if there&#8217;s a way with DOMDocument to extract all the tags used in a document. I have a field in which the user can add some html code, but only a few tags are allowed, I don&#8217;t know in advance which tags the user will insert, so if I could have an array of the all the tags he/she used in the html code, I would know if he/she used some not allowed tag. Thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlo</title>
		<link>http://w-shadow.com/blog/2009/10/20/how-to-extract-html-tags-and-their-attributes-with-php/comment-page-1/#comment-199678</link>
		<dc:creator>Carlo</dc:creator>
		<pubDate>Fri, 20 Apr 2012 13:48:29 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/?p=1375#comment-199678</guid>
		<description>hello great script but it has a bug that I could not fix, if there are more tags linked to the first stop. For example, in this text:
 some cool text  is some more text  
not read the title attribute that is what interests me</description>
		<content:encoded><![CDATA[<p>hello great script but it has a bug that I could not fix, if there are more tags linked to the first stop. For example, in this text:<br />
 some cool text  is some more text<br />
not read the title attribute that is what interests me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Estrarre codice da un tag in PHP &#124; hellofrancesco!</title>
		<link>http://w-shadow.com/blog/2009/10/20/how-to-extract-html-tags-and-their-attributes-with-php/comment-page-1/#comment-198522</link>
		<dc:creator>Estrarre codice da un tag in PHP &#124; hellofrancesco!</dc:creator>
		<pubDate>Thu, 08 Mar 2012 11:36:19 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/?p=1375#comment-198522</guid>
		<description>[...] Questo metodo l&#8217;ho trovato su w-shadow.com. [...]</description>
		<content:encoded><![CDATA[<p>[...] Questo metodo l&#8217;ho trovato su w-shadow.com. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: تست 2 &#124; برنامه نویسی</title>
		<link>http://w-shadow.com/blog/2009/10/20/how-to-extract-html-tags-and-their-attributes-with-php/comment-page-1/#comment-179232</link>
		<dc:creator>تست 2 &#124; برنامه نویسی</dc:creator>
		<pubDate>Sat, 17 Sep 2011 20:56:43 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/?p=1375#comment-179232</guid>
		<description>[...] gerard agber says:  July 13, 2010 at 19:21 [...]</description>
		<content:encoded><![CDATA[<p>[...] gerard agber says:  July 13, 2010 at 19:21 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raj</title>
		<link>http://w-shadow.com/blog/2009/10/20/how-to-extract-html-tags-and-their-attributes-with-php/comment-page-1/#comment-170383</link>
		<dc:creator>Raj</dc:creator>
		<pubDate>Mon, 13 Jun 2011 11:22:04 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/?p=1375#comment-170383</guid>
		<description>Thanks... Really helpfull</description>
		<content:encoded><![CDATA[<p>Thanks&#8230; Really helpfull</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: urimm</title>
		<link>http://w-shadow.com/blog/2009/10/20/how-to-extract-html-tags-and-their-attributes-with-php/comment-page-1/#comment-169785</link>
		<dc:creator>urimm</dc:creator>
		<pubDate>Thu, 26 May 2011 07:58:18 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/?p=1375#comment-169785</guid>
		<description>Those snippets are AWESOME. 
Thank you very much, that helped me a lot!</description>
		<content:encoded><![CDATA[<p>Those snippets are AWESOME.<br />
Thank you very much, that helped me a lot!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: White Shadow</title>
		<link>http://w-shadow.com/blog/2009/10/20/how-to-extract-html-tags-and-their-attributes-with-php/comment-page-1/#comment-168728</link>
		<dc:creator>White Shadow</dc:creator>
		<pubDate>Wed, 13 Apr 2011 15:01:59 +0000</pubDate>
		<guid isPermaLink="false">http://w-shadow.com/?p=1375#comment-168728</guid>
		<description>It appears you are unfamiliar with PHP (to say the least). You need to quote your strings. Use &#039;script&#039; and &#039;src&#039;, not just script and src without quotes.</description>
		<content:encoded><![CDATA[<p>It appears you are unfamiliar with PHP (to say the least). You need to quote your strings. Use &#8216;script&#8217; and &#8216;src&#8217;, not just script and src without quotes.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

