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.
- 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'
}
};
Remember: it is simpler to assume that all end of hash structure branch is represented by ref($hash) eq "".
No comments:
Post a Comment