The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WiX3::XML::Role::Tag - Base role for XML tags.

VERSION

This document describes WiX3::XML::Role::Tag version 0.005

SYNOPSIS

    # use WiX3;

DESCRIPTION

This is the base class for all Classes that represent XML tags.

INTERFACE

as_string

        $string = $tag->as_string();

Returns a string of XML that contains the tag defined by this object and all child tags.

This routine is implemented by classes satisfying this role.

as_string_children

        $string = $tag->as_string_children();

This routine returns a string of XML that contains the tag defined by this object and all child tags, and is used by as_string.

indent

        $string = $tag->indent(4, $string);

This routine indents the string passed in with the given number of spaces, and is used by as_string.

get_namespace

        $string = $tag->get_namespace();

Returns the namespace the tag uses. If the tag is in the main WiX namespace, this routine returns q{xmlns='http://schemas.microsoft.com/wix/2006/wi'}.

This routine is implemented by classes satisfying this role.

get_namespaces

        @array = $tag->get_namespaces();

Returns an list of all namespaces used by the tag and its children.

If this tag and all child tags are in the main WiX namespace, this routine returns a list with one element: undef.

This routine is used by Fragment::as_string.

get_component_array

        @component_array = $tag->get_component_array();

Returns a list of components contained in this tag. If there are no XML::WiX3::Classes::Role::Component children in this tag, an empty list is returned.

        $attribute_string = $tag->print_attribute('Id', $id);

Returns a string to use when printing the attribute specified within a tag if $id is defined, otherwise, returns an empty, but defined, string.

This is meant to be used in as_string routines.

DIAGNOSTICS

The indent and print_attribute routines will throw XWC::Exception::Parameter::Missing and XWC::Exception::Parameter::Invalid objects, which are defined in XML::WiX3::Classes::Exceptions.

There are no other diagnostics for this role, however, other diagnostics may be used by classes implementing this role.

INCOMPATIBILITIES

None reported.

BUGS AND LIMITATIONS

No bugs have been reported.

Please report any bugs or feature requests to bug-xml-wix3-classes@rt.cpan.org, or through the web interface at http://rt.cpan.org.

AUTHOR

Curtis Jewell <csjewell@cpan.org>

LICENCE AND COPYRIGHT

Copyright (c) 2009, Curtis Jewell <csjewell@cpan.org>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.