Result:
found more than 682 distributions - search limited to the first 2001 files matching your query ( run in 1.155 )


Wurst

 view release on metacpan or  search on metacpan

pod/wurst.pod  view on Meta::CPAN

These stand for "Needleman and Wunsch" and "Smith and
Waterman" respectively.  Any other value will cause an error.

=back

=item svm_rs_cdata MODEL NATIVE SCOR_SET RS_PARAM CVTYPE

*EXPERIMENTAL!*

The function returns an array of training vectors suitable
for use in training a support vector machine (libSVM.pm) or

pod/wurst.pod  view on Meta::CPAN

=item svm_rsfeat MODEL SCOR_SET RS_PARAMS CVTYPE

This returns a set of feature vectors for each position in
MODEL, calculated from local sequence-structure fitness and
residue-specific interaction terms according to the CVTYPE
scheme (see svm_rs_cdata or scoranlys.c for details).  The
form is as follows :

  my @m_fvset = svm_rsfeat MODEL, SCOR_SET, PARAMS, 0
  @m_fvset is of form
    [ (undef), [feature vector], .., .., (undef)]

 view all matches for this distribution


Wx-Perl-TreeView

 view release on metacpan or  search on metacpan

lib/Wx/Perl/TreeView.pm  view on Meta::CPAN

        $tree->SetItemHasChildren( $item, 0 );
        return;
    }

    for( my $i = 0; $i < $count; ++$i ) {
        my( $ccookie, $cstring, $cimage, $ccdata ) =
            $model->get_child( $cookie, $i );

        my $child = $tree->AppendItem
          ( $item, $cstring, ( defined $cimage ? $cimage : -1 ), -1,
            Wx::TreeItemData->new( { cookie => $ccookie, data => $ccdata } ) );
        $tree->SetItemHasChildren( $child, $model->has_children( $ccookie ) );
    }
}

=head2 reload

lib/Wx/Perl/TreeView.pm  view on Meta::CPAN


    return $can_refresh;
}

sub _check {
    my( $self, $pitem, $pcookie, $pstring, $pimage, $pcdata,
        $is_expanding ) = @_;
    my( $model, $tree ) = ( $self->model, $self->treectrl );
    my $data = { text   => $pstring,
                 image  => $pimage,
                 cookie => $pcookie,
                 data   => $pcdata,
                 childs => [],
                 };
    return ( 1, $data ) if grep $_ == $pitem, @$is_expanding;
    return ( 1, $data ) unless $tree->IsExpanded( $pitem );
    my $cchilds = $tree->GetChildrenCount( $pitem, 0 );

lib/Wx/Perl/TreeView.pm  view on Meta::CPAN

    return ( 0, undef ) if $cchilds != $mchilds;

    my( $child, $cookie ) = $tree->GetFirstChild( $pitem );
    my $index = 0;
    while( $child->IsOk ) {
        my( $ccookie, $cstring, $cimage, $ccdata ) =
            $model->get_child( $pcookie, $index );
        my( $can_refresh, $cdata ) = $self->_check
            ( $child, $ccookie, $cstring, $cimage, $ccdata, $is_expanding );
        return ( 0, undef ) unless $can_refresh;
        push @{$data->{childs}}, $cdata;
        ( $child, $cookie ) = $tree->GetNextChild( $pitem, $cookie );
        ++$index;
    }

    return ( 1, $data );

 view all matches for this distribution


Wx

 view release on metacpan or  search on metacpan

ext/ribbon/t/03_threads.t  view on Meta::CPAN

my $artprov4 = Wx::RibbonDefaultArtProvider->new();

my $rgitem1 = $rgallery->Append( Wx::Bitmap->new( 100, 100, -1 ), -1, MyDataContainer->new('Stashed Data 0'));
my $rgitem2 = $rgallery->Append( Wx::Bitmap->new( 100, 100, -1 ), -1, MyDataContainer->new('Stashed Data 1'));

my $cdata1 = $rgallery->GetItemClientData( $rgitem1 );
my $cdata2 = $rgitem2->GetClientData();

my ( $buttonbar, $button,  $buttonbar2, $button2, $buttonbar3, $button3 );

if ( Wx::wxVERSION < 3.000000 ) {
    $buttonbar = Wx::RibbonButtonBar->new($rpanel, -1 );

ext/ribbon/t/03_threads.t  view on Meta::CPAN

my $toolbar3 = Wx::RibbonToolBar->new($rpanel, 1 );
my $tool3 = $toolbar3->AddTool(-1, Wx::Bitmap->new( 100, 100, -1 ), wxNullBitmap,
      "HW Help", Wx::wxRIBBON_BUTTON_NORMAL(), 
      { data => 'Stashed Data' } );

isa_ok($cdata1, 'MyDataContainer');
is( $cdata1->{somedata}, 'Stashed Data 0' );
isa_ok($cdata2, 'MyDataContainer');
is( $cdata2->{somedata}, 'Stashed Data 1' );

undef $artprov2;
undef $artprov4;
undef $rgitem2;
undef $buttonbar2;

 view all matches for this distribution


XAO-Indexer

 view release on metacpan or  search on metacpan

lib/XAO/DO/Data/Index.pm  view on Meta::CPAN

 }

=cut

sub search_by_string ($$$;$) {
    my ($self,$ordering,$str,$rcdata)=@_;

    return $self->indexer->search(
        index_object    => $self,
        search_string   => $str,
        ordering        => $ordering,
        rcdata          => $rcdata,
    );
}

###############################################################################

lib/XAO/DO/Data/Index.pm  view on Meta::CPAN

may take significant time!

=cut

sub search_by_string_oid ($$$;$) {
    my ($self,$ordering,$str,$rcdata)=@_;

    my $cids=$self->indexer->search(
        index_object    => $self,
        search_string   => $str,
        ordering        => $ordering,
        rcdata          => $rcdata,
    );

    my $coll_obj=$self->get_collection_object;
    my @oids;
    foreach my $cid (@$cids) {

lib/XAO/DO/Data/Index.pm  view on Meta::CPAN

EXPERIMENTAL UNSTABLE API.

=cut

sub suggest_alternative ($$$$;$) {
    my ($self,$ordering,$str,$rcdata,$need_results)=@_;

    return $self->indexer->suggest_alternative(
        index_object    => $self,
        search_string   => $str,
        ordering        => $ordering,
        rcdata          => $rcdata,
        need_results    => $need_results,
    );
}

###############################################################################

 view all matches for this distribution


XForms-Generator

 view release on metacpan or  search on metacpan

Generator/Common.pm  view on Meta::CPAN

								  [ @XFORMS_ATTRIBUTE_LINKING ],
								  0,
								  [ "##ANYDOM##" ],
								  [], ],
	"xforms:submission"		=>	[ [ "action", "method", "id" ], 
								  [ "cdata-section-elements", "encoding", 
							  		"indent", "omit-xml-declaration", 
									"ref", "replace", "seperator", 
									"standalone", "version" ],
								  1,
								  [],

 view all matches for this distribution


XHTML-Instrumented

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

Makefile.PL
MANIFEST			This list of files
META.yml
README
t/args.t
t/cdata.t
t/changes.t
t/checkbox.t
t/checkbox_loop.t
t/checkbox_loop2.t
t/coverage.t

 view all matches for this distribution


XHTML-MediaWiki

 view release on metacpan or  search on metacpan

lib/XHTML/MediaWiki.pm  view on Meta::CPAN

#    warn "_html_comment: " . join(' ', @_);
}

sub _html_text
{
    my ($parser, $dtext, $skipped_text, $is_cdata) = @_;
    my @tagstack = @{$parser->{tag_stack}};
    my ($newtext, $newstate);

    if (my ($leading) = ($dtext =~ /^(\n+)/m)) {
        my $x = length($leading);
        $parser->end_line($x);
        $dtext = substr($dtext, $x);
    }

    if ($is_cdata && $parser->can_cdata) {
        $newtext = $dtext;
    } else {
        $newtext = encode($dtext);
    }

lib/XHTML/MediaWiki.pm  view on Meta::CPAN


    use base 'HTML::Parser';

    use Params::Validate qw (validate);

    sub can_cdata
    {
        my $self = shift;
        if (my $current = $self->check_current_block) {
            return $self->{tags}{$current->{type}}{can_cdata};
        }
        return 0;
    }

    sub end_line

lib/XHTML/MediaWiki.pm  view on Meta::CPAN


    my $parser = XHTML::MediaWiki::Parser->new
        (start_h   => [\&_html_tag, 'self, "S", tagname, text, attr'],
         end_h     => [\&_html_tag, 'self, "E", tagname, text'],
         comment_h => [\&_html_comment, 'self, text'],
         text_h    => [\&_html_text, 'self, dtext, skipped_text, is_cdata'],
         marked_sections => 1,
         boolean_attribute_value => '__TEXT_MEDIAWIKIFORMAT_BOOL__',
        );
    $parser->{opts} = {},
    $parser->{tags} = {

lib/XHTML/MediaWiki.pm  view on Meta::CPAN

        rb => {},
        rp => {},
        rt => {},
        ruby => { 
            block => 'ruby',
            can_cdata => 1,
        },
        s => {},
        samp => {},
        small => {},
        strike => {},

 view all matches for this distribution


XML-API

 view release on metacpan or  search on metacpan

lib/XML/API.pm  view on Meta::CPAN


    if ( $self->{comment} ) {
        return $indent . '<!-- ' . $self->{comment} . ' -->';
    }

    if ( $self->{cdata} ) {
        return $indent . '<![CDATA[' . $self->{cdata} . ']]>';
    }

    if ( !@{ $self->{contents} } ) {
        return
            $indent . '<'

lib/XML/API.pm  view on Meta::CPAN


sub fast_string {
    my $self = shift;

    $self->{comment} && return '';
    $self->{cdata}   && return '<![CDATA[' . $self->{cdata} . ']]>';

    return
        '<'
      . ( $self->{ns} ? $self->{ns} . ':' : '' )
      . $self->{element}

lib/XML/API.pm  view on Meta::CPAN

    # FIXME: should escape?
    $self->_raw( XML::API::Element->new( comment => join( '', @_ ) ) );
    return;
}

sub _cdata {
    my $self = shift;
    $self->_raw( XML::API::Element->new( cdata => join( '', @_ ) ) );
    return;
}

sub _css {
    my $self    = shift;

lib/XML/API.pm  view on Meta::CPAN

    $x->_raw('-->')

Except that indentation is correct. Any occurences of '--' in $content
will be replaced with '- -'.

=head2 $x->_cdata($content)

A shortcut for $x->_raw("\n<![CDATA[", $content, " ]]>");

=head2 $x->_css($content )

 view all matches for this distribution


XML-All

 view release on metacpan or  search on metacpan

lib/XML/All.pm  view on Meta::CPAN

};

my $unwrap = sub {
    $twig{$id->($_[0]) || do {
        my $elt = XML::Twig::Elt->new(XML::Twig::PCDATA);
        $elt->_set_pcdata($_[0]);
        return $elt;
    }};
};

sub xml {

 view all matches for this distribution


XML-Atom-SimpleFeed

 view release on metacpan or  search on metacpan

lib/XML/Atom/SimpleFeed.pm  view on Meta::CPAN

sub xml_attr_escape {
	$_[0] =~ s{ ( [\x0A\x0D<>&'"] ) }{ $XML_ESC{ $1 } }gex;
	&xml_cref;
}

sub xml_cdata_flatten {
	for ( $_[0] ) {
		my $cdata_content;
		s{<!\[CDATA\[(.*?)]]>}{ xml_escape $cdata_content = $1 }gse;
		croak 'Incomplete CDATA section' if -1 < index $_, '<![CDATA[';
		return $_;
	}
}

sub xml_string { xml_cref xml_cdata_flatten $_[ 0 ] }

sub xml_tag {
	my $name = shift;
	my $attr = '';
	if( ref $name eq 'ARRAY' ) {

 view all matches for this distribution


XML-Atom-Stream

 view release on metacpan or  search on metacpan

lib/XML/Atom/Stream.pm  view on Meta::CPAN

my %Map = ('&' => '&amp;', '"' => '&quot;', '<' => '&lt;', '>' => '&gt;',
           '\'' => '&apos;');
my $RE = join '|', keys %Map;

sub encode_xml {
    my($str, $no_cdata) = @_;
    if (!$no_cdata && $str =~ m/
        <[^>]+>  ## HTML markup
        |        ## or
        &(?:(?!(\#([0-9]+)|\#x([0-9a-fA-F]+))).*?);
                 ## something that looks like an HTML entity.
        /x) {

 view all matches for this distribution


XML-Atom-Syndication

 view release on metacpan or  search on metacpan

lib/XML/Atom/Syndication/Text.pm  view on Meta::CPAN

                      if (@children == 1 && $local eq 'div');

                    # $text->{__body} = '<div>';
                    my $w = XML::Atom::Syndication::Writer->new;
                    $w->set_prefix('', 'http://www.w3.org/1999/xhtml');
                    $w->no_cdata(1);  # works nicer with fringe case. see tests.
                    map { $text->{__body} .= $w->as_xml($_) } @children;

                    # $text->{__body} .= '</div>';
                } else {
                    $text->{__body} = $elem->text_content;

 view all matches for this distribution


XML-AutoWriter

 view release on metacpan or  search on metacpan

lib/XML/AutoWriter.pm  view on Meta::CPAN

   my XML::Doctype::ElementDecl $root_elt = $elts->{$root} ;
   # print STDERR "searching for $root ... $dest\n" ;

   return []
      if $root_elt->is_any
         || ( $dest eq '#PCDATA' && $root_elt->can_contain_pcdata ) ;

   my $paths = $root_elt->{PATHS} ;
   unless ( $paths ) {
      ## Init the cache
      $paths = $root_elt->{PATHS} = {

lib/XML/AutoWriter.pm  view on Meta::CPAN

      # print STDERR "doing $gkid\n" ;
      push @$todo, $elts->{$gkid}->child_names ;

      my $gkid_path = $paths->{$gkid} ;

      if ( $elts->{$gkid}->can_contain_pcdata() ) {
	 $paths->{'#PCDATA'} = [ @$gkid_path, $gkid ]
	    unless exists $paths->{'#PCDATA'} ;
	 # print STDERR "checking (pcdata) ",
	 # join( '', map "<$_>", @{$paths->{'#PCDATA'}} ), "\n" ;
	 if ( $dest eq '#PCDATA' ) {
	    # print STDERR "Yahoo!\n" ;
	    return $paths->{'#PCDATA'} ;
	 }

 view all matches for this distribution


XML-Axk

 view release on metacpan or  search on metacpan

lib/XML/Axk/SAX/BuildDOM2.pm  view on Meta::CPAN

    $self->{Element}->appendChild (
                            $self->{Document}->createEntityReference ($name));
    undef $self->{LastText};
} #entity_reference()

sub start_cdata
{
    my $self = shift;
    $self->{InCDATA} = 1;
} #start_cdata()

sub end_cdata
{
    my $self = shift;
    $self->{InCDATA} = 0;
} #end_cdata()

sub comment
{
    my $self = $_[0];

 view all matches for this distribution


XML-Bare-SAX-Parser

 view release on metacpan or  search on metacpan

parser_engine.c  view on Meta::CPAN

                    *(cpos+4) == 'D' &&
                    *(cpos+5) == 'A' &&
                    *(cpos+6) == 'T' &&
                    *(cpos+7) == 'A'    ) {
                  cpos += 9;
                  goto cdata;
                }
                else {
                  cpos++; cpos++;
                  goto val_x;//actually goto error...
                }

parser_engine.c  view on Meta::CPAN

        goto val_1;
      }
      cpos++;
      goto bang;
    
    cdata:
      let = *cpos;
      if( !let ) goto done;
      if( let == ']' && *(cpos+1) == ']' && *(cpos+2) == '>' ) {
        cpos += 3;
        goto val_1;

parser_engine.c  view on Meta::CPAN

        curnode->vallen = 0;
        curnode->numvals = 1;
      }
      if( curnode->numvals == 1 ) curnode->vallen++;
      cpos++;
      goto cdata;
      
    name_1:
      let = *cpos;
      if( !let ) goto done;
      switch( let ) {

 view all matches for this distribution


XML-Bare

 view release on metacpan or  search on metacpan

Bare.pm  view on Meta::CPAN

    if( ref( $oba ) eq 'HASH' ) { $posa = $oba->{'_pos'} || 0; }
    if( ref( $obb ) eq 'HASH' ) { $posb = $obb->{'_pos'} || 0; }
    return $posa <=> $posb;
  } keys %$objs;
  
  if( $objs->{'_cdata'} ) {
    my $val = $objs->{'value'};
    $val =~ s/^(\s*\n)+//;
    $val =~ s/\s+$//;
    $val =~ s/&/&amp;/g;
    $val =~ s/</&lt;/g;
    $objs->{'value'} = $val;
    #$xml = "$less![CDATA[<div class='node'><div class='cdata'>$val</div></div>]]$more";
    $cd0 = "$less![CDATA[<div class='node'><div class='cdata'>";
    $cd1 = "</div></div>]]$more";
  }
  for my $i ( @dex ) {
    my $obj  = $objs->{ $i } || '';
    my $type = ref( $obj );

Bare.pm  view on Meta::CPAN

    }
    else {
      if( $i eq 'comment' ) { $xml .= "$less!--" . $obj . "--$more" . "<br>\n"; }
      elsif( $i eq 'value' ) {
        if( $level > 1 ) {
          if( $obj && $obj =~ /[<>&;]/ && ! $objs->{'_cdata'} ) { $xml .= "$less![CDATA[$obj]]$more"; }
          else { $xml .= $obj if( $obj =~ /\S/ ); }
        }
      }
      elsif( $i =~ /^_/ ) {}
      else { $xml .= "$less$tn0$i$tn1$more$obj$less/$tn0$i$tn1$more"; }

 view all matches for this distribution



XML-Checker

 view release on metacpan or  search on metacpan

lib/XML/Checker.pm  view on Meta::CPAN

	$self->Char ($data);
    }
}

# PerlSAX API
sub start_cdata
{
    $_[0]->{InCDATA} = 1;
}

# PerlSAX API
sub end_cdata
{
    $_[0]->{InCDATA} = 0;
}

sub Char

lib/XML/Checker.pm  view on Meta::CPAN

}

# Treat CDATASection same as Char (Text)
sub CData
{
    my ($self, $cdata) = @_;
    my $context = $self->{Context};

    $context->[0]->Char ($self, $cdata);

    # CDATASection can never be insignificant whitespace
    $INSIGNIF_WS = 0;
#?? I'm not sure if this assumption is correct
}

lib/XML/Checker.pm  view on Meta::CPAN

XML::Checker now also supports the PerlSAX interface, so you can use XML::Checker
wherever you use PerlSAX handlers.

XML::Checker implements the following methods: start_document, end_document,
start_element, end_element, characters, processing_instruction, comment,
start_cdata, end_cdata, entity_reference, notation_decl, unparsed_entity_decl,
entity_decl, element_decl, attlist_decl, doctype_decl, xml_decl

Not implemented: set_document_locator, ignorable_whitespace

See PerlSAX.pod for details. (It is called lib/PerlSAX.pod in the libxml-perl 

 view all matches for this distribution


XML-Comma

 view release on metacpan or  search on metacpan

lib/XML/Comma/Element.pm  view on Meta::CPAN


##
# object fields
#
# _content             : string holding element content
# _cdata               : mark this element as needing to be wrapped in
#                        a CDATA container. currently, any element that
#                        has a CDATA start tag anywhere immediately inside it
#                        will be marked this way

# no need for an init sub here (parent's does the work of initting the

lib/XML/Comma/Element.pm  view on Meta::CPAN

##

##
# called by parser and part of public api
#
# mark this element as needing a cdata wrapper
sub cdata_wrap {
  $_[0]->assert_not_read_only();
  $_[0]->{_cdata} = 1;
}
#
##


lib/XML/Comma/Element.pm  view on Meta::CPAN


# all callees (validate_content_hooks) should die with a message
# string if they encounter an error
sub validate_content {
  my ( $self, $text ) = @_;
  if ( $_[0]->{_cdata} ) {
    $text = "<![CDATA[$text]]>";
  }
  # check for un-parseable content by trying to parse and catching
  # errors. then ask the def to call any of its validate_hooks
  eval {

lib/XML/Comma/Element.pm  view on Meta::CPAN

  # don't output if empty
  return ''  unless defined $content and
                            $content ne '';
  my $str;
  $str = '<' . $self->tag() . $self->attr_string() . '>';
  $str .= '<![CDATA['  if  $self->{_cdata};
  $str .= $content;
  $str .= ']]>'  if $self->{_cdata};
  $str .= '</'. $self->tag() . '>';
  $str .= "\n";
  return $str;
}

 view all matches for this distribution


XML-CompactTree-XS

 view release on metacpan or  search on metacpan

XS.pm  view on Meta::CPAN

Planned flags:

   XCT_USE_QNAMES - use QNames instead of local names for all nodes
   XCT_TEXT_AS_STRING - put text nodes into the tree as plain scalars
   XCT_PRESERVE_PARENT - add a slot with a weak reference to the parent node
   XCT_MERGE_TEXT_NODES - merge adjacent text/cdata nodes together

Features: allow blessing the array refs to default or user-specified
classes; the default classes would provide a very small subset of DOM
methods to retrieve node information, manipulate the tree, and
possibly serialize the parse tree back to XML.

 view all matches for this distribution


XML-CompactTree

 view release on metacpan or  search on metacpan

CompactTree.pm  view on Meta::CPAN

Planned flags:

   XCT_USE_QNAMES - use QNames instead of local names for all nodes
   XCT_TEXT_AS_STRING - put text nodes into the tree as plain scalars
   XCT_PRESERVE_PARENT - add a slot with a weak reference to the parent node
   XCT_MERGE_TEXT_NODES - merge adjacent text/cdata nodes together

Features: allow blessing the array refs to default or user-specified
classes; the default classes would provide a very small subset of DOM
methods to retrieve node information, manipulate the tree, and
possibly serialize the parse tree back to XML.

 view all matches for this distribution


XML-Compare

 view release on metacpan or  search on metacpan

lib/XML/Compare.pm  view on Meta::CPAN

	grep { (not $_->isa('XML::LibXML::Comment')) and
		   not ( $_->isa("XML::LibXML::Text") && ($_->data =~ /\A\s*\Z/) )
	       } $node2->childNodes();

    # firstly, convert all CData nodes to Text Nodes
    @nodes1 = _convert_cdata_to_text( @nodes1 );
    @nodes2 = _convert_cdata_to_text( @nodes2 );

    # append all the consecutive Text nodes
    @nodes1 = _squash_text_nodes( @nodes1 );
    @nodes2 = _squash_text_nodes( @nodes2 );

lib/XML/Compare.pm  view on Meta::CPAN

    _msg($l, '/');
    return 1;
}

# takes an array of nodes and converts all the CDATASection nodes into Text nodes
sub _convert_cdata_to_text {
    my @nodes = @_;
    my @new;
    foreach my $n ( @nodes ) {
	if ( ref $n eq 'XML::LibXML::CDATASection' ) {
	    $n = XML::LibXML::Text->new( $n->data() );

 view all matches for this distribution


XML-Compile

 view release on metacpan or  search on metacpan

lib/XML/Compile/FAQ.pod  view on Meta::CPAN


To get CDATA blocks, the solution is very close to the example in the
previous section:

   my $doc   = XML::LibXML::Document->new('1.1', 'UTF-8');
   my $cdata = $doc->createCDATASection($content);
   my $xml   = $schema->writer($type)->($doc, { field => $cdata });
   $doc->setDocumentElement($xml);

The "$content" is a Perl string, which means that it needs to be
utf8 when it is utf8.  For instance:

   use File::Slurp::Tiny;
   my $content = read_file $filename, binmode => 'utf8';
   my $cdata   = $doc->createCDATASection($content);

When using SOAP (with or without WSDL) you need to do something like
this:

   use XML::LibXML;   # for ::Document

 view all matches for this distribution


XML-Crawler

 view release on metacpan or  search on metacpan

t/XML-Crawler.t  view on Meta::CPAN

                                    'type'  => 'text/css'
                                },
                                [ '
/*',
                                    [
                                        '#cdata-section',
                                        '*/
@import url("/2008/site/css/advanced");
/*'
                                    ],
                                    '*/

t/XML-Crawler.t  view on Meta::CPAN

                                            'type' => 'text/javascript'
                                        },
                                        [ '
//',
                                            [
                                                '#cdata-section',
                                                '
<!-- -->
//'
                                            ] ] ] ] ] ] ] ] ] ] );

 view all matches for this distribution


XML-DOM-Lite

 view release on metacpan or  search on metacpan

lib/XML/DOM/Lite.pm  view on Meta::CPAN

     }
 }

... or ...

 @cdata = map {
     $_->nodeValue if $_->nodeType == TEXT_NODE
 }, @{$node->childNodes};

... or for attributes :

 view all matches for this distribution


XML-DOM

 view release on metacpan or  search on metacpan

lib/XML/DOM.pm  view on Meta::CPAN


use XML::DOM::DOMException;

sub getNodeName
{
    "#cdata-section";
}

sub getNodeType
{
    CDATA_SECTION_NODE;

lib/XML/DOM.pm  view on Meta::CPAN

}

sub _to_sax
{
    my ($self, $doch, $dtdh, $enth) = @_;
    $doch->start_cdata;
    $doch->characters ( { Data => $self->getData } );
    $doch->end_cdata;
}

######################################################################
package XML::DOM::Comment;
######################################################################

 view all matches for this distribution


XML-DOM2

 view release on metacpan or  search on metacpan

lib/XML/DOM2.pm  view on Meta::CPAN


	foreach my $name (keys(%{$hash})) {
		my $data  = $hash->{$name};

		if($name eq '+') {
			$element->cdata($data)
		} elsif($name =~ /^_(.+)$/) {
			$element->setAttribute($1, $data);
		} else {
		  my $isa = UNIVERSAL::isa($data, 'ARRAY');
			my $child = $isa ? $name : $element->createElement( $name );

lib/XML/DOM2.pm  view on Meta::CPAN

# Adapt a SCALAR into XML
sub _adapt_scalar
{
	my ($self, $element, $scalar) = @_;
	if(defined($scalar)) {
		my $result = $element->createElement( '#cdata-entity', text => scalar( $scalar ) );
	}
	return $element;
}

=head2 $object->extension()

lib/XML/DOM2.pm  view on Meta::CPAN

	if($type eq '#document' or $type eq $self->_document_name) {
		$opts{'documentTag'} = $type if $type ne '#document';
		return XML::DOM2::Element::Document->new(%opts);
	} elsif($type eq '#comment') {
		return XML::DOM2::Element::Comment->new( delete($opts{'text'}), %opts);
	} elsif($type eq '#cdata-entity') {
		return XML::DOM2::Element::CDATA->new(delete($opts{'text'}), %opts);
	}
	return XML::DOM2::Element->new( $type, %opts );
}

 view all matches for this distribution


XML-DOMHandler

 view release on metacpan or  search on metacpan

DOMHandler.pm  view on Meta::CPAN

#
my %dispatch_table = (
		      &XML_ELEMENT_NODE        => '_handle_element',
		      &XML_ATTRIBUTE_NODE      => '_handle_attribute',
		      &XML_TEXT_NODE           => '_handle_text',
		      &XML_CDATA_SECTION_NODE  => '_handle_cdata',
		      &XML_ENTITY_REF_NODE     => '_handle_entity_ref',
		      &XML_ENTITY_NODE         => '',
		      &XML_PI_NODE             => '_handle_pi',
		      &XML_COMMENT_NODE        => '_handle_comment',
		      &XML_DOCUMENT_NODE       => '_handle_doc_node',

DOMHandler.pm  view on Meta::CPAN

sub _handle_text {
    my( $self, $node ) = @_;
    return $self->_apply_user_handler( $node, 'generic_text' );
}

sub _handle_cdata {
    my( $self, $node ) = @_;
    return $self->_apply_user_handler( $node, 'generic_CDATA' );
}

sub _handle_entity_ref {

 view all matches for this distribution


XML-DT

 view release on metacpan or  search on metacpan

examples/ex7.pl  view on Meta::CPAN

%handler=(
    '-outputenc' => 'ISO-8859-1',
#    '-default'   => sub{"<$q>$c</$q>"},
     '-begin'  => sub{print"BEGIN\n"},
     '-end'  => sub{print"end\n";"$beginLatex$c$endLatex"},
     '-pcdata' => sub{ 
         if(inctxt('(SECTION|SUBSEC1)')) {$c =~ s/[\s\n]+/ /g; $c }
         $c },
     'RANDLIST' => sub{"\\begin{itemize}$c\\end{itemize}"},
     'AFFIL' => sub{""},
     'TITLE' => sub{

examples/ex7.pl  view on Meta::CPAN

 my @aut=();

 %handler=(
     '-outputenc' => 'ISO-8859-1',
 #    '-default'   => sub{"<$q>$c</$q>"},
      '-pcdata' => sub{ 
 	 if(inctxt('(SECTION|SUBSEC1)')) {$c =~ s/[\s\n]+/ /g; $c }
 	 $c },
      'RANDLIST' => sub{"\\begin{itemize}$c\\end{itemize}"},
      'AFFIL' => sub{""},
      'TITLE' => sub{

 view all matches for this distribution


( run in 1.155 second using v1.01-cache-2.11-cpan-995e09ba956 )