Here is the code.
my $input_xml; open my $fh, '>>:encoding(utf8)', $outputfile or die "Cannot open: $ou +tputfile: $!"; do { my $dom = XML::LibXML->load_xml(string=>$input_xml); my $isEmpty = !$dom->documentElement->hasChildNodes; print "isEmpty: ", ($isEmpty?"yes":"no"), "\n"; say $fh $input_xml; $offset = $offset + $record_limit +50000 ; print "Offset=$offset\n"; } while ($input_xml = Get_CMDB_CI()); close($fh) || warn "close failed: $!";
In reply to Re^4: How might one determine empty XML payload?
by vlturner
in thread How might one determine empty XML payload?
by vlturner
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |