GNU.WIKI: The GNU/Linux Knowledge Base

  [HOME] [PHP Manual] [HowTo] [ABS] [MAN1] [MAN2] [MAN3] [MAN4] [MAN5] [MAN6] [MAN7] [MAN8] [MAN9]

  [0-9] [Aa] [Bb] [Cc] [Dd] [Ee] [Ff] [Gg] [Hh] [Ii] [Jj] [Kk] [Ll] [Mm] [Nn] [Oo] [Pp] [Qq] [Rr] [Ss] [Tt] [Uu] [Vv] [Ww] [Xx] [Yy] [Zz]


NAME

       XML::Normalize::LibXML - simple whitespace striping functions

SYNOPSIS

       use XML::Normalize::LibXML qw(trim xml_normalize xml_strip_whitespace);

       $greeting=trim("   hallo world    ");  # returns "hallo world"
       xml_normalize($dom->getDocumentElement());
       xml_strip_whitespace($dom->getDocumentElement());

DESCRIPTION

       This module provides simple whitespace striping and text-node
       normalizing functions.

   "trim($string)"
       Returns the string with any whitespace occuring at its beginning or end
       removed.

   "xml_normalize($dom)"
       Puts all Text nodes in the full depth of the sub-tree underneath this
       Element into a normal form where only markup (e.g., tags, comments,
       processing instructions, CDATA sections, and entity references)
       separates Text nodes, i.e., there are no adjacent Text nodes. This can
       be used to ensure that the DOM view of a document is the same as if it
       were saved and re-loaded, and is useful when operations (such as
       XPointer lookups) that depend on a particular document tree structure
       are to be used.

   "xml_strip_whitespace($dom [,$include_attributes])"
       Normalizes the subtree and trims whitespace from all Text nodes within
       the subtree. If the optional argument $include_attributes is defined
       and non-zero, this function trims whitespace also from all Attribute
       nodes.

   "xml_strip_element($node)"
       Removes leading and trailing whitespace from a given element.

AUTHOR

       Petr Pajas, pajas@matfyz.cz

COPYRIGHT

       Copyright 2002-2003 Petr Pajas, All rights reserved.

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

SEE ALSO

       XML::LibXML



  All copyrights belong to their respective owners. Other content (c) 2014-2018, GNU.WIKI. Please report site errors to webmaster@gnu.wiki.
Page load time: 0.117 seconds. Last modified: November 04 2018 12:49:43.