Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    $doc->documentElement->appendChild($doc->createElementNS($ns, 'q:two')
    +);
    $doc->documentElement->appendChild($doc->createElementNS($ns, 'q:three
    +'));
    warn $doc->toString(1);
    
  2. or download this
    <?xml version="1.0"?>
    <q:one xmlns:q="http://www.example.com">
      <q:two xmlns:q="http://www.example.com"/>
      <q:three xmlns:q="http://www.example.com"/>
    </q:one>