<?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>Kavoir &#187; XML Tips and FAQ</title>
	<atom:link href="http://www.kavoir.com/category/world-wide-web-technology/xml/feed" rel="self" type="application/rss+xml" />
	<link>http://www.kavoir.com</link>
	<description>Just another dumbass webmaster, goofing around...</description>
	<lastBuildDate>Thu, 09 Feb 2012 01:59:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>HTML DocType Text: World’s Tiniest and Shortest HTML DocType Declaration</title>
		<link>http://www.kavoir.com/2009/01/html-doctype-text-made-easy-worlds-tiniest-html-doctype-dtd-declaration.html</link>
		<comments>http://www.kavoir.com/2009/01/html-doctype-text-made-easy-worlds-tiniest-html-doctype-dtd-declaration.html#comments</comments>
		<pubDate>Fri, 09 Jan 2009 08:05:48 +0000</pubDate>
		<dc:creator>Yang Yang</dc:creator>
				<category><![CDATA[CSS & HTML Tips]]></category>
		<category><![CDATA[XML Tips and FAQ]]></category>

		<guid isPermaLink="false">http://www.kavoir.com/2009/01/html-doctype-text-made-easy-worlds-tiniest-html-doctype-dtd-declaration.html</guid>
		<description><![CDATA[Dustin Diaz made an interesting discovery to trigger “standards mode” with just a tiny little declaration instead of the regular lengthy one we see everywhere. As opposed to “standard mode”, there’s this “quirks mode” in IE that accommodates legacy HTML code of no standards at all – rendering them in many different ways compared with [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://www.dustindiaz.com/skinny-on-doctypes/">Dustin Diaz</a> made an interesting discovery to trigger “standards mode” with just a tiny little declaration instead of the regular lengthy one we see everywhere.</p>

<p>As opposed to “<strong>standard mode</strong>”, there’s this “<strong>quirks mode</strong>” in IE that accommodates legacy HTML code of no standards at all – rendering them in many different ways compared with standardized HTML who has a harassing top declaration of document type. For example, common HTML document declarations include:</p>
<h6>HTML 4.01 Transitional</h6>
<p> <code>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot; &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&gt;</code><br />
<h6>XHTML 1.0 Strict</h6>
<p> <code>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;</code><br />
<h6>XHTML 1.0 Transitional</h6>
<p> <code>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</code><br />
<h6>XHTML 1.0 Frameset</h6>
<p> <code>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Frameset//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd&quot;&gt;</code>
<p>For a more detailed collection of HTML doctypes, <a href="http://www.w3.org/QA/2002/04/valid-dtd-list.html">read here</a>.</p>
<p>However, except for the sake of validation, a declaration usually counts for nothing. The only purpose of leaving one at the top of every web page you create is for the client browser to make the HTML out in standard way rather than in quirks way. Dustin has found a rather convenient short cut for this:</p>
<p> <code>&lt;!doctype html&gt;</code>
<p>It’s much more memorable and correctly triggers the standard mode. We call it the <strong>skinny html doctype</strong>.</p>
<h3>Related Posts:</h3>
<ul class="similar-posts">
<li><a href="http://www.kavoir.com/2009/06/best-books-of-html-and-xhtml-to-learn-how-to-create-web-pages-sites-with-html-and-css.html" rel="bookmark" title="June 17, 2009">Best Books of HTML and XHTML to Learn How to Create Web Pages / Sites with HTML and CSS</a></li>
<li><a href="http://www.kavoir.com/2009/03/the-ultimate-on-page-seo-checklist-better-seo-semantics-and-accessibility-at-the-same-time.html" rel="bookmark" title="March 2, 2009">The Ultimate On-page SEO Checklist – Better SEO, Semantics and Accessibility at The Same Time</a></li>
<li><a href="http://www.kavoir.com/2007/09/portable-functions-for-manipulating-browser-window.html" rel="bookmark" title="September 25, 2007">JavaScript: Changing Browser Window Width / Height</a></li>
<li><a href="http://www.kavoir.com/2009/08/how-to-make-ie6-to-style-html-5-tags.html" rel="bookmark" title="August 27, 2009">How to make IE6 to style HTML 5 tags?</a></li>
<li><a href="http://www.kavoir.com/2007/05/html5-adopted-by-w3c.html" rel="bookmark" title="May 11, 2007">HTML5 adopted by W3C</a></li>
</ul>
<p><!-- Similar Posts took 2.476 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kavoir.com/2009/01/html-doctype-text-made-easy-worlds-tiniest-html-doctype-dtd-declaration.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to delete / remove nodes in SimpleXML</title>
		<link>http://www.kavoir.com/2008/12/how-to-delete-remove-nodes-in-simplexml.html</link>
		<comments>http://www.kavoir.com/2008/12/how-to-delete-remove-nodes-in-simplexml.html#comments</comments>
		<pubDate>Tue, 02 Dec 2008 12:46:55 +0000</pubDate>
		<dc:creator>Yang Yang</dc:creator>
				<category><![CDATA[PHP Tips & Tutorials]]></category>
		<category><![CDATA[XML Tips and FAQ]]></category>

		<guid isPermaLink="false">http://www.kavoir.com/2008/12/how-to-delete-remove-nodes-in-simplexml.html</guid>
		<description><![CDATA[The other day I was testing and playing with SimpleXML to process some XML documents when I came to a problem – I realized that I needed to delete a node before dumping the XML object to text. However if you are familiar with SimpleXML, it doesn&#8217;t come with a down right way to remove [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>The other day I was testing and playing with <a href="http://www.php.net/simplexml">SimpleXML</a> to process some XML documents when I came to a problem – I realized that I needed to delete a node before dumping the XML object to text. However if you are familiar with SimpleXML, it doesn&#8217;t come with a down right way to remove nodes like <a href="http://www.php.net/domdocument">DOMDocument</a> does.</p>

<p>A few searches on Google neither helped – people were just saying how simple SimpleXML was and it simply could not fulfill a task like this.</p>
<p>You know what I did?  Yes, just &#8216;<a href="http://www.php.net/unset">unset</a>&#8216; the node.</p>
<pre><code>$str = &lt;&lt;&lt;STR
&lt;a&gt;
  &lt;b&gt;
    &lt;c&gt;
    &lt;/c&gt;
  &lt;/b&gt;
&lt;/a&gt;
STR;

$xml = simplexml_load_string($str);
unset($xml –&gt; a –&gt; b –&gt; c); // this would remove node <strong>c</strong>
echo $xml –&gt; asXML(); // xml document string without node <strong>c</strong></code></pre>
<p>There you go!<br />
<h3>Related Posts:</h3>
<ul class="similar-posts">
<li><a href="http://www.kavoir.com/2009/04/php-how-to-process-a-string-one-byte-character-at-a-time.html" rel="bookmark" title="April 23, 2009">PHP: How to process a string one byte (character) at a time</a></li>
<li><a href="http://www.kavoir.com/2012/01/php-check-if-a-string-contain-only-uppercase-capital-letters.html" rel="bookmark" title="January 20, 2012">PHP: Check if A String Contain Only Uppercase / Capital Letters</a></li>
<li><a href="http://www.kavoir.com/2009/04/php-change-tabs-to-spaces-and-vice-versa-in-string-change-tab-sizes-lengths-in-strings.html" rel="bookmark" title="April 23, 2009">PHP: Change Tabs to Spaces and Vice Versa in String | Change Tab Sizes / Lengths in Strings</a></li>
<li><a href="http://www.kavoir.com/2009/06/javascript-split-and-divide-text-string-by-a-delimiter.html" rel="bookmark" title="June 16, 2009">JavaScript: Split and Divide Text String by A Delimiter</a></li>
<li><a href="http://www.kavoir.com/2009/04/php-what-is-hash-hashing-a-string-generate-hash-of-strings.html" rel="bookmark" title="April 22, 2009">PHP: What is Hash? | Hashing a String | Generate Hash of Strings</a></li>
</ul>
<p><!-- Similar Posts took 2.528 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kavoir.com/2008/12/how-to-delete-remove-nodes-in-simplexml.html/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>

