- Consider this XML data:
<Order>
<Number>01234</Number>
<Status />
</Order> - Using XML::Simple produces:
$VAR1 = {
'Order' => {
'Status' => {},
'Number' => '01234'
}
}; - Utilizing XML::SAX, we could insert a null string instead of an empty hash structure:
$VAR1 = {
'Order' => {
'Status' => '',
'Number' => '01234'
}
};
Wednesday, January 23, 2008
Why Convert XML Data To Hash Structure Using XML::SAX?
Instead of using XML::Simple? The structure, generated by XML::Simple, is not consistent since it recognizes an empty tag as empty hash structure, instead of null string.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment