Ignoring your attempts at using an XML parser as an XML generator
Who said LibXML is just a parser?
XML::LibXML supports namespaces. XML::Smart doesn't (except when used to generate documents).
Yes, probably because it's too old for it. It doesn't support XSD, either, which is part of the reason I'm switching to LibXML.
I'm not debating that Smart is missing critical functionality. I'm frustrated that LibXML is this mature, and is a Perl module, and yet is this clunky at navigation. Nor are there any modules for XML::LibXML that enhance it to fix its navigation.
I mean seriously, this is what I have to do to check for a tag and fill data for it:
# Before $sn->{'SourceDBType'} ||= 'XML'; # After $sn->findvalue('SourceDBType') || ($sn->find('SourceDBType') ? $sn->fi +nd('SourceDBType')->setData('XML') : $sn->addNewChild(undef, 'SourceD +BType')->setData('XML'));
Are you kidding me?!?! That's a horrible mess! And god forbid I do something like $sn->find('SourceDBType')->setData('XML') without checking the existence of SourceDBType first. That'll give me a fatal error.
XML::LibXML preserves the order of the children of elements. XML::Smart can't even list the children of an element.
Incorrect. Smart does both: $XML->{server}{address}[1]('@'); # there's your children of that <address> tag
In reply to Re^2: XML::LibXML - WHAR HASH TREES WHAR?!
by SineSwiper
in thread XML::LibXML - WHAR HASH TREES WHAR?!
by SineSwiper
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |