Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
212 lines (179 sloc) 5.64 KB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Data::asXML</title>
<!-- metadata -->
<meta name="version" content="S5 1.1" />
<meta name="presdate" content="20091201" />
<meta name="author" content="Jozef Kutej"/>
<meta name="company" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<!-- configuration parameters -->
<meta name="defaultView" content="slideshow" />
<!-- <meta name="defaultView" content="outline" /> -->
<meta name="controlVis" content="hidden" />
<!-- style sheet links -->
<link rel="stylesheet" href="ui/default/slides.css" type="text/css" media="projection" id="slideProj" />
<link rel="stylesheet" href="ui/default/outline.css" type="text/css" media="screen" id="outlineStyle" />
<link rel="stylesheet" href="ui/default/print.css" type="text/css" media="print" id="slidePrint" />
<link rel="stylesheet" href="ui/default/opera.css" type="text/css" media="projection" id="operaFix" />
<!-- S5 JS -->
<script src="ui/default/slides.js" type="text/javascript"></script>
<!-- syntax highlighting -->
<link rel="stylesheet" type="text/css" href="ui/sh/sh_style.css" />
<script type="text/javascript" src="ui/sh/sh_main.js"></script>
<script type="text/javascript" src="ui/sh/sh_perl.js"></script>
<script type="text/javascript" src="ui/sh/sh_sql.js"></script>
<!-- custom -->
<script src="ui/jquery-1.2.6.js" type="text/javascript"></script>
<script src="ui/custom.js" type="text/javascript"></script>
<link rel="stylesheet" href="ui/custom.css" type="text/css" />
</head>
<body><!-- onload='sh_highlightDocument();' -->
<div class="layout">
<div id="controls"><!-- DO NOT EDIT --></div>
<div id="currentSlide"><!-- DO NOT EDIT --></div>
<div id="header"></div>
<div id="footer">
<!-- added by Jozef :) -->
<div id="counter" style="float: right; margin-right: 10px;">15</div>
<span id="ignoreClicks" />
<h1>01 December 2009</h1>
<h2>Data::asXML</h2>
</div>
</div>
<div class="presentation">
<div class="slide">
<h1 style="text-align: center;">&nbsp;</h1>
<h1 style="text-align: center;">Data::asXML</h1>
<h2 style="text-align: center;">01 December 2009</h2>
</div>
<div class="slide">
<h1>Data</h1>
</div>
<div class="slide">
<h1>XML</h1>
</div>
<div class="slide">
<h1>Plenty of modules</h1>
<ul>
<li><a href="http://search.cpan.org/perldoc?XML::Compile">XML::Compile</a> - Compilation based XML processing</li>
<li><a href="http://search.cpan.org/perldoc?XML::Twig">XML::Twig</a> - A perl module for processing huge XML documents in tree mode.</li>
<li><a href="http://search.cpan.org/perldoc?XML::Pastor">XML::Pastor</a> - Generate Perl classes with XML bindings starting from a W3C XSD Schema</li>
<li><a href="http://search.cpan.org/perldoc?XML::Smart">XML::Smart</a> - A smart, easy and powerful way to access/create XML files/data.</li>
<li><a href="http://search.cpan.org/perldoc?XML::Simple">XML::Simple</a> - Easy API to maintain XML (esp config files)</li>
<li>...</li>
</ul>
</div>
<div class="slide">
<h1>One thing in common</h1>
<div class="singleThing">mapping any <big>XML</big> to Data</div>
</div>
<div class="slide">
<h1>Data::asXML</h1>
<div class="singleThing">mapping any <big>Data</big> to XML</div>
</div>
<div class="slide">
<h1>more or less</h1>
<div class="singleThing">serializing Perl data structures to XML</div>
</div>
<div class="slide">
<h1>Supported types</h1>
<ul>
<li>SCALAR</li>
<li>ARRAY</li>
<li>HASH</li>
<li>REF</li>
<li>references</li>
</ul>
</div>
<div class="slide">
<h1>SCALAR</h1>
<ul>
<li>-&gt;encode("abc")</li>
<li><pre>&lt;VALUE&gt;abc&lt;/VALUE&gt;</pre></li>
</ul>
</div>
<div class="slide">
<h1>SCALAR undef</h1>
<ul>
<li>-&gt;encode(undef)</li>
<li><pre>&lt;VALUE type=&quot;undef&quot;/&gt;</pre></li>
</ul>
</div>
<div class="slide">
<h1>SCALAR binary</h1>
<ul>
<li>-&gt;encode(chr(255))</li>
<li><pre>&lt;VALUE type=&quot;base64&quot;&gt;/w==&lt;/VALUE&gt;</pre></li>
</ul>
</div>
<div class="slide">
<h1>REF</h1>
<ul>
<li>-&gt;encode(\"abc")</li>
<li><pre>&lt;VALUE subtype=&quot;ref&quot;&gt;abc&lt;/VALUE&gt;</pre></li>
</ul>
</div>
<div class="slide">
<h1>ARRAY</h1>
<ul>
<li>-&gt;encode([ 1, 2, 3 ])</li>
<li><pre>&lt;ARRAY&gt;
&lt;VALUE&gt;1&lt;/VALUE&gt;
&lt;VALUE&gt;2&lt;/VALUE&gt;
&lt;VALUE&gt;3&lt;/VALUE&gt;
&lt;/ARRAY&gt;</pre></li>
</ul>
</div>
<div class="slide">
<h1>HASH</h1>
<ul>
<li>-&gt;encode({ 1 => 2, 3 => 4 })</li>
<li><pre>&lt;HASH&gt;
&lt;KEY name=&quot;1&quot;&gt;
&lt;VALUE&gt;2&lt;/VALUE&gt;
&lt;/KEY&gt;
&lt;KEY name=&quot;3&quot;&gt;
&lt;VALUE&gt;4&lt;/VALUE&gt;
&lt;/KEY&gt;
&lt;/HASH&gt;</pre></li>
</ul>
</div>
<div class="slide">
<h1>references</h1>
<ul>
<li>-&gt;encode([1,\%h,\%h])</li>
<li><pre>&lt;ARRAY&gt;
&lt;VALUE&gt;1&lt;/VALUE&gt;
&lt;HASH&gt;
&lt;KEY name=&quot;1&quot;&gt;
&lt;VALUE&gt;2&lt;/VALUE&gt;
&lt;/KEY&gt;
&lt;/HASH&gt;
&lt;HASH href=&quot;*[2]&quot;/&gt;
&lt;/ARRAY&gt;</pre></li>
</ul>
</div>
<div class="slide">
<h1>see <a href="http://github.com/jozef/Data-asXML/blob/master/t/01_Data-asXML.t">t/01_Data-asXML.t</a> for more examples</h1>
</div>
<div class="slide">
<h1>safe_mode => 1</h1>
</div>
<div class="slide">
<h1>made for XPATH</h1>
<pre> /HASH/KEY[@name="key"]/VALUE
/HASH/KEY[@name="key2"]/ARRAY/*[3]/VALUE
/ARRAY/*[1]/VALUE
/ARRAY/*[2]/HASH/KEY[@name="key3"]/VALUE</pre>
</div>
<div class="slide">
<h1><a href="http://github.com/jozef/Data-asXML">http://github.com/jozef/Data-asXML</a></h1>
</div>
<div class="slide">
<h1>Questions?</h1>
</div>
</body>
</html>