- XML Document structure
- SEE ALSO
- BUGS AND LIMITATIONS
- LICENCE AND COPYRIGHT
Kvasir::Writer::XML - Store Kvasir engine declarations as XML
use Kvasir::Writer::XML; my $xml = Kvasir::Writer::XML->as_xml($engine); Kvasir::Loader::XML->to_file($engine, "my_engine.xml");
This module provides a mean to write Kvasir engine declarations to XML.
- as_xml ( ENGINE )
Returns a XML-representation of ENGINE
- to_file ( ENGINE, PATH )
Creates a XML-representation of ENGINE and saves it at PATH.
The structure of the XML created by this writer is described in "XML Document structure" in Kvasir::Loader::XML.
Arguments to entities (actions, inputs, hooks, outputs and rules) will be tested to see if it's a single hash reference and if so be written as such using the key as element name and the value as the elements text content.
However, if the implementing class of the entitiy implements the method
process_xml_writers_args this will be called as a class method and is responsible for adding children to the element. The arguments to the method are the document as a
XML::LibXML::Document-instance, the entity-element as
XML::LibXML::Element-instance which to add children to and a list of the arguments encapsulated by
Kvasir::TypeDecl-instance that represents the entity.
Please report any bugs or feature requests to
firstname.lastname@example.org, or through the web interface at http://rt.cpan.org.
Copyright (c) 2007, Versed Solutions
<email@example.com>. All rights reserved.
This software is released under the MIT license cited below.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.