NAME VS::RuleEngine::Writer::XML - Store VS::RuleEngine engine declarations as XML SYNOPSIS use VS::RuleEngine::Writer::XML; my $xml = VS::RuleEngine::Writer::XML->as_xml($engine); VS::RuleEngine::Loader::XML->to_file($engine, "my_engine.xml"); DESCRIPTION This module provides a mean to write VS::RuleEngine engine declarations to XML. INTERFACE CLASS METHODS as_xml ( ENGINE ) Returns a XML-representation of *ENGINE* to_file ( ENGINE, PATH ) Creates a XML-representation of *ENGINE* and saves it at *PATH*. XML Document structure The structure of the XML created by this writer is described in "XML Document structure" in VS::RuleEngine::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 "VS::RuleEngine::TypeDecl"-instance that represents the entity. SEE ALSO VS::RuleEngine VS::RuleEngine::Loader::XML BUGS AND LIMITATIONS Please report any bugs or feature requests to "bug-vs-ruleengine-writer-xml@rt.cpan.org", or through the web interface at . AUTHOR Claes Jakobsson "" LICENCE AND COPYRIGHT Copyright (c) 2007 - 2008, Versed Solutions "". All rights reserved. This software is released under the MIT license cited below. The "MIT" License 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.