XML::XMLWriter 0.1
Sponsored Links
XML::XMLWriter 0.1 Ranking & Summary
File size:
0.007 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
1132
Date added:
2006-09-21
Publisher:
XML::XMLWriter Team
XML::XMLWriter 0.1 description
XML::XMLWriter is a Perl module for creating a XML document object oriented with on the fly validating towards the given DTD.
Example Code
#!/usr/bin/perl
use XML::XMLWriter;
my @data=([Name, Adress, Email, Sex],
[Herbert, BeerAvenue 45, herbert@names.org, Male],
[Anelise, SchmidtStreet 21, foo@bar.com, Female],
[XYZ, ZYX, ZY, XZ],
[etc...]);
my $doc = new XML::XMLWriter(system => http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd,
public => -//W3C//DTD XHTML 1.0 Transitional//EN);
my $html = $doc->createRoot;
$html->head->title->_pcdata(A Table);
my $body = $html->body;
$body->h1->_pcdata(Here is a table!);
my $table = $body->table({align => center, cellspacing => 1, cellpadding => 2, border => 1});
for(my $i=0; $i<@data; $i++) {
my $tr = $table->tr;
foreach $_ (@{$data[$i]}) {
$i==0 ? $tr->th->_pcdata($_) : $tr->td->_pcdata($_);
}
}
$body->b->_pcdata("thats it!");
$doc->print();
XMLWriter is a Perl 5 object class, its purpose is to make writing XML documents easier, cleaner, safer and standard conform. Its easier because of the object oriented way XML documents are written with XMLWriter. Its cleaner because of the simple but logical API and its safe and standard conform because of the automatically done checking against the the DTD.
But still: it might be a matter of taste whether one finds XMLWriter usefull or not and it probably has some bugs (i would appreciate a lot if you report them to me), many usefull features are missing, not implemented or not even thought of and perhaps the API with all its simpleness might be confusing though. So please tell me your opinion and tell me the way how you would make XMLWriter better. Its not so easy to develop a good API for this matter.
XMLWriter contains 3 packages: XMLWriter.pm which gives you the document object, Element.pm which provides the element/tag objects and PCData.pm which represents the parsed character data the document contains. Therell probably come more objects in feature releases. The most interesting class is Element.pm. It provides some methods you can call on every document element, but besides those methods it uses the AUTOLOAD feature of perl to expect every not known method name to be the name of a tag that should be added to the list of child tags of the element the method is called on. So calling $html->head will simply add a new element (the head element) to the list of child tags of the html element. The head object is returned. Have a look at the examples for better understanding. You should also read the POD of Element.pm and PCdata.pm.
Example Code
#!/usr/bin/perl
use XML::XMLWriter;
my @data=([Name, Adress, Email, Sex],
[Herbert, BeerAvenue 45, herbert@names.org, Male],
[Anelise, SchmidtStreet 21, foo@bar.com, Female],
[XYZ, ZYX, ZY, XZ],
[etc...]);
my $doc = new XML::XMLWriter(system => http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd,
public => -//W3C//DTD XHTML 1.0 Transitional//EN);
my $html = $doc->createRoot;
$html->head->title->_pcdata(A Table);
my $body = $html->body;
$body->h1->_pcdata(Here is a table!);
my $table = $body->table({align => center, cellspacing => 1, cellpadding => 2, border => 1});
for(my $i=0; $i<@data; $i++) {
my $tr = $table->tr;
foreach $_ (@{$data[$i]}) {
$i==0 ? $tr->th->_pcdata($_) : $tr->td->_pcdata($_);
}
}
$body->b->_pcdata("thats it!");
$doc->print();
XMLWriter is a Perl 5 object class, its purpose is to make writing XML documents easier, cleaner, safer and standard conform. Its easier because of the object oriented way XML documents are written with XMLWriter. Its cleaner because of the simple but logical API and its safe and standard conform because of the automatically done checking against the the DTD.
But still: it might be a matter of taste whether one finds XMLWriter usefull or not and it probably has some bugs (i would appreciate a lot if you report them to me), many usefull features are missing, not implemented or not even thought of and perhaps the API with all its simpleness might be confusing though. So please tell me your opinion and tell me the way how you would make XMLWriter better. Its not so easy to develop a good API for this matter.
XMLWriter contains 3 packages: XMLWriter.pm which gives you the document object, Element.pm which provides the element/tag objects and PCData.pm which represents the parsed character data the document contains. Therell probably come more objects in feature releases. The most interesting class is Element.pm. It provides some methods you can call on every document element, but besides those methods it uses the AUTOLOAD feature of perl to expect every not known method name to be the name of a tag that should be added to the list of child tags of the element the method is called on. So calling $html->head will simply add a new element (the head element) to the list of child tags of the html element. The head object is returned. Have a look at the examples for better understanding. You should also read the POD of Element.pm and PCdata.pm.
XML::XMLWriter 0.1 Screenshot
XML::XMLWriter 0.1 Keywords
XML
XMLWriter
DTD
XMLWriter 0.1
API
XML Document Object
Object Oriented
XML document
Perl module
object
document
Perl
pcdata
element
oriented
XML::XMLWriter
Bookmark XML::XMLWriter 0.1
XML::XMLWriter 0.1 Copyright
WareSeeker periodically updates pricing and software information of XML::XMLWriter 0.1 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of XML::XMLWriter 0.1 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
object oriented programming
object-oriented
object oriented design
javascript xml document object
object oriented perl
xml document object model
object oriented computing
object-oriented programming
object oriented programming language
vbscript xml document object
object oriented systems
xml document object model dom
object oriented encapsulation
object lessons
c# xmlwriter
hidden object games
xml document object javascript
asp xml document object
Related Software
XML::ValidWriter is DOCTYPE driven valid XML output. Free Download
XML::Writer::Simple is a Perl module to create XML files easily! Free Download
XML::Records is a Perl module for perlish record-oriented interface to XML. Free Download
XML::DOM::Lite::XSLT is Perl module XSLT engine for XML::DOM::Lite. Free Download
XML::XMetaL is a Perl module with dispatch class for XML::XMetaL development framework. Free Download
Simple Plain Xml Parser is a simple and plain xml parser written in C++. Free Download
XML::Checker is a Perl module for validating XML. Free Download
Xmldoom package contains the XML Document Object-Oriented Model. Free Download
Latest Software
Popular Software
Favourite Software