XML::Compile::XOP::Include(3pm) User Contributed Perl Documentation XML::Compile::XOP::Include(3pm)

XML::Compile::XOP::Include - Represents one XOP node.

  # See also SYNOPSIS of XML::Compile::XOP
  my $xop       = XML::Compile::XOP->new;
  my $xop_image = $xop->bytes($binary_image);
  my $answer    = $call->(image => $xop_image);

Represents one data-set which will be represented as separate (binary) object during transport. This can only be used on data fields which are base64Binary.

YOU SHOULD NOT instantiate this kind of objects directly, but use the XML::Compile::XOP method to create them.

The object is overloaded to produce the contained data when a scalar is required, for instance when you call functions like "length". This means that, hopefully, the end-user does not see much of a difference between data which is transported inline or packaged separately.

Collect the data from a HTTP::Message object.
You have to specify either a "file" or "byte" source. Otherwise, the constructor will return "undef".

 -Option--Default
  bytes   undef
  cid     <required>
  file    undef
  type    <required>
  xmime   <required>
  xop     <required>
    
Take the data from a STRING of reference.
The Content-ID of the binary attachment.
Take the data from the specified file.
The MIME-Type of the data.

$obj->cid()
Returns the Content-ID.
$obj->content( [$byref] )
Returns the content, when $byref (boolean) is true, then the value is returned by reference.
$obj->contentCharset()
Returns the character set, as provided by the Content-Type header.
$obj->contentType()
Returns the media type included in the Content-Type header.
$obj->string()
Returns the content as string in Perl internal encoding.

$obj->mimePart( [$headers] )
Produce the message part which contains a normal mime representation of a binary file. You may provide an initial $headers (HTTP::Headers) object, or an ARRAY of headers to instantiate such an object.
$obj->write($filename|$fh)
Write the content to the specified FILE.
$obj->xmlNode($document, $path, $tag)
The $document will be used to construct the node from. The $path is an indicator for the location of the node within the data structure (used in error messages). The $tag is the prefixed name for the node to be created.

Returned is an XML node to be included in the output tree.

This object stringifies to its binary content.

This module is part of XML-Compile-SOAP distribution version 3.28, built on August 01, 2022. Website: http://perl.overmeer.net/CPAN/

Copyrights 2007-2022 by [Mark Overmeer <markov@cpan.org>]. For other contributors see ChangeLog.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://dev.perl.org/licenses/

2022-08-04 perl v5.34.0