NAME
XML::Stream::Hash - Functions to make building and parsing the hash easier to work with.
SYNOPSIS
Just a collection of functions that do not need to be in memory if you
choose one of the other methods of data storage.
The Hash format is an exercise to reduce the memory foot print of the
XML. By not using the Tree format with many levels of arrays and hashs,
and just using one large Hash you lower the memory requirements but lose
some flexability.
One thing you lose is that you cannot do:
"text <tag>something</tag> more text"
The format is not setup to handle that. It is optimized to only handle
either children, or cdata, but not a mixture of both.
FORMAT
The result of parsing:
<foo><head id="a">Hello <em>there</em></head><bar>Howdy<ref/></bar>do</foo>
would be:
$hash{'root'} = "1";
$hash{'1-child'} = "2,4";
$hash{'1-data'} = "do";
$hash{'1-desc'} = "2,3,4,5";
$hash{'1-tag'} = "foo";
$hash{'2-att-id'} = "a";
$hash{'2-child'} = "3";
$hash{'2-data'} = "Hello ";
$hash{'2-desc'} = "3";
$hash{'2-tag'} = "head";
$hash{'3-data'} = "there";
$hash{'3-tag'} = "em";
$hash{'4-child'} = "5";
$hash{'4-data'} = "Howdy";
$hash{'4-desc'} = "5";
$hash{'4-tag'} = "bar";
$hash{'5-tag'} = "ref";
AUTHOR
By Ryan Eatmon in March 2001 for http://jabber.org/
COPYRIGHT
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.