mifflin has asked for the wisdom of the Perl Monks concerning the following question:
<ROOT-NS:doctag xmlns:ROOT-NS="http://www.xxxx.com/yyy">
<ROOT-NS:bodytag>
<data xmlns="http://www.xxxx.com/zzz">
<test>ok</test>
</data>
</ROOT-NS:bodytag>
</ROOT-NS:doctag>
Notice the data tag.This makes my data tag look like...$root_ns = "http://www.xxxx.com/yyy"; $data_ns = "http://www.xxxx.com/zzz"; $prefix_map = { $root_ns => 'ROOT-NS', $data_ns => '' };
<__NS1:data xmlns:__NS1="http://www.xxxx.com/zzz">
<test>ok<test>
<__NS1:data>
... and the data tag section looks like...$xml = XML::Writer->new(DATA_MODE => 1, DATA_INDENT => 2, NAMESPACES = +> 1, PREFIX_MAP => $prefix_map);
The perldocs for XML::Writer say...$xml->startTag([[$data_ns, 'data']]); $xml->dataElement('test', 'ok'); $xml->endTag();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: XML::Writer and the default namespace
by diotalevi (Canon) on Feb 27, 2003 at 03:23 UTC | |
by Anonymous Monk on Feb 27, 2003 at 03:35 UTC | |
by diotalevi (Canon) on Feb 27, 2003 at 03:41 UTC |