Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,2 @@
|
|||
use XML::Simple;
|
||||
print XMLout( { root => { element => "Some text here" } }, NoAttr => 1, RootName => "" );
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
use XML::DOM::BagOfTricks qw(createDocument createTextElement);
|
||||
|
||||
my ($doc, $root) = createDocument('root');
|
||||
$root->appendChild(
|
||||
createTextElement($doc, 'element', 'Some text here')
|
||||
);
|
||||
print $doc->toString;
|
||||
12
Task/XML-DOM-serialization/Perl/xml-dom-serialization-3.pl
Normal file
12
Task/XML-DOM-serialization/Perl/xml-dom-serialization-3.pl
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
use XML::LibXML;
|
||||
|
||||
$xml = XML::LibXML::Document->new('1.0');
|
||||
$node = $xml->createElement('root');
|
||||
$xml->setDocumentElement($node);
|
||||
$node2 = $xml->createElement('element');
|
||||
$text = $xml->createTextNode('Some text here');
|
||||
$node2->addChild($text);
|
||||
$node->appendWellBalancedChunk('text');
|
||||
$node->addChild($node2);
|
||||
|
||||
print $xml->toString;
|
||||
Loading…
Add table
Add a link
Reference in a new issue