File: //usr/local/share/man/man3/XML::DOM::Text.3pm
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
. if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{\
. nr % 0
. nr F 2
. \}
. \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "XML::DOM::Text 3"
.TH XML::DOM::Text 3 "2000-01-31" "perl v5.26.3" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
XML::DOM::Text \- A piece of XML text in XML::DOM
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
XML::DOM::Text extends XML::DOM::CharacterData, which extends
XML::DOM::Node.
.PP
The Text interface represents the textual content (termed character
data in \s-1XML\s0) of an Element or Attr. If there is no markup inside an
element's content, the text is contained in a single object
implementing the Text interface that is the only child of the element.
If there is markup, it is parsed into a list of elements and Text nodes
that form the list of children of the element.
.PP
When a document is first made available via the \s-1DOM,\s0 there is only one
Text node for each block of text. Users may create adjacent Text nodes
that represent the contents of a given element without any intervening
markup, but should be aware that there is no way to represent the
separations between these nodes in \s-1XML\s0 or \s-1HTML,\s0 so they will not (in
general) persist between \s-1DOM\s0 editing sessions. The \fBnormalize()\fR method
on Element merges any such adjacent Text objects into a single node for
each block of text; this is recommended before employing operations
that depend on a particular document structure, such as navigation with
XPointers.
.SS "\s-1METHODS\s0"
.IX Subsection "METHODS"
.IP "splitText (offset)" 4
.IX Item "splitText (offset)"
Breaks this Text node into two Text nodes at the specified
offset, keeping both in the tree as siblings. This node then
only contains all the content up to the offset point. And a
new Text node, which is inserted as the next sibling of this
node, contains all the content at and after the offset point.
.Sp
Parameters:
\fIoffset\fR The offset at which to split, starting from 0.
.Sp
Return Value: The new Text node.
.Sp
DOMExceptions:
.RS 4
.IP "\(bu" 4
\&\s-1INDEX_SIZE_ERR\s0
.Sp
Raised if the specified offset is negative or greater than the number of
characters in data.
.IP "\(bu" 4
\&\s-1NO_MODIFICATION_ALLOWED_ERR\s0
.Sp
Raised if this node is readonly.
.RE
.RS 4
.RE