Config::Generator::XML - Config::Generator XML support
This module eases XML content generation by providing several functions to generate XML abstractions (xml_blank(), xml_comment(), xml_element(), xml_parse() and xml_wrap()) and one function to convert these abstractions into strings (xml_string()).
Note: only a subset of XML is supported. This means that this module is not suited for HTML generation.
This module provides the following functions (none of them being exported by default):
return an XML abstraction representing a blank line
return an XML abstraction representing a comment
return an XML abstraction representing an element:
ATTR: defines the attributes as a hash or array reference
BODY: defines the body as a string or list of XML abstractions
parse the given string (that must contain well formed XML) and return the list of XML abstractions it contains
return the string representation of the given XML abstraction; supported options:
indent: how many spaces to prepend to each line (default: 0)
indent
line: maximum line length (longer lines will be wrapped)
line
sort: which elements to have their attributes sorted differently, as a hash: name => sorting function
sort
split: which elements to split (i.e. to have their attributes split on different lines), as a hash: name => boolean
split
wrap the given XML elements into nested elements of the given names (with no attributes)
Lionel Cons http://cern.ch/lionel.cons
Copyright (C) CERN 2013-2016
To install Config::Generator, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Config::Generator
CPAN shell
perl -MCPAN -e shell install Config::Generator
For more information on module installation, please visit the detailed CPAN module installation guide.