Open. So the following description apply to odfMeta() and odfDocument().. The value of the 'file' option may be an open IO::File object, that allows the application to use an application-provided file handle. However, you should prefer file paths/names when possible, and read the explanations about the constructor and the save() method in the OpenOffice::OODoc::File manual page before using open file handles. Remember that, as soon as the given file or handle is an ODF container, OODoc::XPath uses OODoc::File.DF file interface) my $oofile = odfContainer('source.odt'); my $doc = odfXPath(container => $oofile, part => 'meta'); # option 3 (using a regular ODF'. Note that the 'part' option replaces the deprecated 'member' option. However, for compatibility reasons, 'member' is supported yet (if both 'member' and 'part' are erroneously provided, 'member' prevails).DF', attributes => ).
Copies an existing element of any type and appends it to the end of the document body. No new element is created.');
Appends a sequence of multiple spaces to a text element, knowing that a string containing repeated spaces shouldn't be stored as is in a document (see setText() and spaces() for details about repeated spaces).
Appends a tab stop ("\t") to a text element.
See spaces()..
See spaces().).
Deletes the calling document object. Recommended as soon as the object is no longer needed by the application, and sometimes mandatory to avoid memory leaks, especially in long-running processes.
Returns the XML string for use by another application representing the body of a document, without UTF8 decoding.
See getXMLContent()(), even if the 'multiple_spaces' property is set (this property affects the setText() method only).  !).
Returns the value of a given attribute in a given element. The element is the first argument, the name of the attribute the second one. The return value is undef if the attribute is not defined in the given element. Example: my $element = $doc->getElement('//text:p', 15); my $style = $doc->getAttribute($element, 'text:style-name'); returns the style for paragraph 15. If the given attribute name doesn't include a namespace prefix, the namespace of the attribute is automatically supposed to be the same as the namespace of the element. In addition, any blank space within the attribute name is regarded as a '-'. So, the same example could be be written more concisely as shown below: my $element = $doc->getElement('//text:p', 15); my $style = $doc->getAttribute($element, 'style name');
Returns a list of the element's attributes in the form of a hash whose keys are the attributes' XML names.
Returns the root of the document body. The document body is the main container of all the displayable content not including page headers, page footers, and page backgrounds.
Returns the list of the descendants of the given context element). This method returns an element's). Limit: getElement() doesn't implement the full XPath specification, while it supports a large subset (see the XML::Twig documentation for details about the current XPath coverage).
Returns an element according to the given identifier, if any, or undef otherwise. Note that, according to the ODF 1.1 standard, some elements have identifiers (i.e. text:id attributes), while most haven't, so this method can't work with any object. Allowed options are: tag => restricts the search to a given element tag context => restricts the search to a given context Example: $section = $doc->getElement('//text:section', 0); $note = $doc->getElementByIdentifier( "id004", tag => 'text:note', context => $section ); This sequence selects the note (i.e. footnote or endnote) identified by "id004" if such a note appear in the first section of the document. Without the 'context' option, the search space would be the current context (that is the whole document by default). Without the 'tag' option, the first object that owns the given identifier is selected, whatever its tag. See also getIdentifier(), setIdentifier(), identifier().. An optional context argument may be provided in order to restrict the search space. Note: the returned list contains elements in the sense of getElement() and not a list of element contents.
Returns the first text segment of an element whose text content is segmented due to one or more child elements. In other words, returns the beginning of the text content up to the first child element, if any. If the given element just contains flat text, without any child element, returns the whole text, just like getText() introduced below.
Like getText() below, but without rendering of possible tab stops, line breaks, repeated spaces, or any other markup. The returned text is just a decoded flat string.
Selects the frame identified by the given name, or by the given order number in the document context.
Returns the identifier (text:id) of the given element, if any. See also identifier(), setIdentifier(), selectElementByIdentifier()..
Returns the litteral description of a visible object. This method makes sense for frames or frame-like objects (such as images or text boxes).
Returns the name of the given element, if any.().
Returns the name of the document part, i.e. 'content', 'styles', 'meta', and so on.
Returns the absolute root element of the document. The root element contains any other visible or non visible object, including the document body (see getBody) and style definitions..
Returns the text nodes belonging (at any level) to the given context element. So-called text nodes are low-level text runs, without attributes, that populate text containers such as paragraphs, knowing that a paragraph may contain one or more text nodes. For an example, as soon as a bookmark is put within a pararaph, there is (at least) one text node before the bookmark and another one after the bookmark. The textnodes are returned as a list in the order of the context. Note that a text node is not an element, but that every text node in a regular document is a child of a text element (generally a paragraph, a heading or a text span). So, the node-based parent() method may be used to get the element that contains a given text node. The second argument (optional) specifies a search filter. If it's provided, only the matching text nodes are returned. The example below uses getTextNodes() in order to count the text nodes that contain "foo" and that belong to elements whose style is "bar" in the whole document body (beware, this examples uses methods which are introduced in the OpenOffice::OODoc::Text manual chapter): my $context = $doc->getBody; my @list = (); foreach my $tn ($doc->getTextNodes($context, "foo")) { my $style = $doc->getAttribute ($tn->parent, 'style name'); next unless $style; push @list, $tn if $style eq "bar"; }
Returns the element (if defined) representing a user-defined field, and corresponding to the given name. See also userFieldValue(). By default, this method works with the first user field declaration matching the given name in the whole document. However, if the calling object is a 'styles' document part, the search is restricted to a given context (provided through an optional 2nd argument) or to the current context. This feature allows the applications to look for user fields whose declarations are associated to page styles.
Returns the list of the declared user-defined fields. The example below prints the names of all the user-defined fields: foreach my $field ($doc->getUserFields) { print $doc->getObjectName($field); } By default, this method returns all the user fields at the document level. However, if the active document part is 'styles', the search is restricted to a given context (provided through an optional 2nd argument) or to the current context. This feature allows the applications to look for user fields whose declarations are associated to page styles.
Returns the user-defined variable identified by the given name. [Contribution by Andrew Layton]
See getVariable()..
Gets or sets the identifier of the given element. If the value argument is not provided, does the same as getIdentifier(). If provided, the value argument replaces the previous element identifier or creates it if it was not set. This method can change the identifier, but can't remove it, unlike setIdentifier(). See also getIdentifier(), setIdentifier(), getElementByIdentifier().. However, for insertion within a text container, setChildElement(), described later, is much more powerful. Other options are: text => "text of element" attributes => $attributes(), and to insert an element at a selected position within an existing element, see setChildElement().).
Creates a free text node (to be inserted later within a text element). A text node is a piece of flat text, without any attribute, that may be a part or the text content of an element. Note that it's a low level method for special uses; there are various text-oriented methods in the API (mainly described is the ::Text manual page), and the explicit use of text nodes should be avoided.
Returns the name of the given element. Changes this name is a new name is provided as the 2nd argument.
Class method. Converts the numeric time given in argument to an OpenOffice-compliant date (ISO-8601). The argument type is the same as for the standard Perl localtime() function, i.e. a number of seconds since the "epoch". It can be, for example, a value previously returned by a time() call. Without argument, returns the current local time in ISO-8601 format. The result of this function can be used as is in order to set the value of an ODF-compliant date-time element or attribute.
Class method..
See openDocumentVersion()
Class method. See odfLocaltime()
Class method. See odfTimelocal()
Returns the version of the Open Document Format (ODF) in use in the current document. If an argument is provided, it's used to set a new version identifier. Beware, this method doesn't really check the conformance of the document to any version of the ODF standard. It just retrieves the value of the version number attribute as it has been set by the application which created or modified the document. If openDocumentVersion() is used to set a new version number declaration, the given value is not checked. So, this value could be the number of a real or future ODF version (1.0, 1.1, 1.2, etc), as well as any other arbitrary value (ex: 99, -1, ...)..
Deletes the given element (if found) by [path, position] or by reference and returns "true". Returns undef if the element does not exist.
Deletes the identifier attribute ('text:id') of the given element. Be careful, this method should be used in order to delete temporary element identifiers that don't comply with the ODF specification; remember that the identifier is mandatory for some elements. See also getIdentifier(), setIdentifier(), identifier().;
Resets the search context to its default value, which is the root of the document. See currentContext().
Saves the content of the current document through a physical output, that is either a regular file specified by path/name, or an open, application-provided IO::Handle. If no argument is provided, the document which had been used as the source (if any) is used as the default target. Technically, as soon as the document container is a regular ODF file, this method is a stub for the save() method of the associated OpenOffice::OODoc::File object, so all the related explanations and recommendations given in the OpenOffice::OODoc::File manual chapter apply. So, for example, be careful if the target is an open IO::Handle instead of a file path/name..
Like selectElementsByAttribute in a scalar context. By default, returns the first element at the given path which has the given attribute containing the given value. If the value is omitted, then returns the first (or only) element that owns the attribute whatever the value. The context optional argument allows to restrict the search space to a given container. The last optional argument, if set, is a positive integer that specifies the index of the required element if more than one element match the other conditions (beware: if the specified position is out of range, the result is undef). The following example (that apply with the "styles" part of an ODF document) prints a message if the "Time New Roman" font face is declared: print "The Time New Roman font is defined !" if $styles->selectElementByAttribute ( 'style:font-face', 'style:name', "Times New Roman" ); Returns undef if no element matches the conditions. See also selectElementsByAttribute().
Like selectElementByAttribute(), but for an array context. Returns all the elements that match the path/attribute/value/context conditions as a list. The following example selects a document section whose name is "Foreword" then selects the list of all the level 3 headings in this section (note that $section is used as the optional context argument in the second instruction): my $section = $doc->selectElementByAttribute ('text:section', 'text:name', "Foreword"); my @headings3 = $doc->selectElementsByAttribute ('text:h', 'text:outline-level', 3, $section); (But remember that the same result could be got without knowledge of the XML tags and attributes using more user-friendly methods introduced in other manual chapters !) See also selectElementByAttribute().
Selects the first frame element whose name is exactly the given argument. A frame is an OpenDocument container which can host a rectangular object, such as an image or a text box.
This low-level method returns a list of nodes (which are not necessarily elements) which match the give XPath expression. See getNodeByXPath() for options and comments.
Modifies or adds an attribute to an element. The element is indicated by reference or by [path, position]. The following arguments are the attribute name and the value. If the name is provided without namespace prefix, it's automatically concatenated to the element's namespace prefix. Every space in the attribute name, if any, is automatically replaced by a '-'. If the value is undef, the corresponding attribute is deleted if it exists in the element; nothing is done otherwise.
Modifies or adds one or more attributes to an element. The element is indicated by reference or by [path, position]. The list of attributes is given in the form of a hash name => value. Example: my $h = $doc->getElement('//text:h', 12); $doc->setAttributes( $h, 'text:style-name' => 'My Header', 'text:level' => 3 ); This sequence gives the 'My Header' style and level 3 to the 13th "header" element in the document. Any attribute name provided without namespace prefix is automatically concatenated with the namespace prefix of the target element. So, the "text:" prefix could have been omitted in the attribute hash of the example above. In addition, every space in an attribute name is automatically replaced by a '-'. So the code below produces the same result as the previous example: my $h = $doc->getElement('//text:h', 12); $doc->setAttributes( $h, 'style name' => 'My Header', 'level' => 3 ); An attribute provided as undef is deleted, if it exists.
Creates a new child element within the text content of an existing one. The context element may be provided like with insertElement(), either by [path, position] or directly as the 1st argument. The next argument is the XML tag of the element to be created, or an existing free element. The given context may be any element, including the whole document body; however, it should be a simple text container in most cases. If the provided tag doesn't include a namespace prefix, it's automatically concatenated with the namespace prefix of the context element (provided as 1st argument). In addition, every space (" ") is regarded as a "-". For example, knowing that the ODF names of a line break and a tab stop are respectively 'text:line-break' and 'text:tab', they may be specified as 'line break' and 'tab' when they are inserted in a regular text paragraph (that is their right place). For alternative and very specific purposes, the tag argument may be replaced by a function reference. If so, the corresponding application- provided function will be triggered with the following arguments: the containing document, a text node, a position, and possibly a string (this last argument will be provided if setChildElement() is called with a 'replace', 'after', 'before' or 'capture' argument introduced below and will contain the matching substring). The application-provided function is supposed to insert one or more contiguous new elements in the text node at the given position (optionally using the given substring); it must return an element. However, most users may safely forget this feature... Allowed options are attributes => attribute/value hash for the new element text => text content for the new element offset => position after => search string (regexp) before => search string (regexp) replace => search string (regexp) capture => search string (regexp) way => search way ('forward' or 'backward') start_mark => element end_mark => element Some of them are mutually exclusive. They work according to the following logic. By default, the new element is created without text and attributes. However, an initial content may be provided through a 'text' optional parameter. In addition, a 'attributes' option allows to provide a set of attributes for the new element as a hash reference; note that every attribute name provided without namespace prefix is automatically concatenated with the same namespace prefix as the given element name. The child element may be inserted at the beginning, at the end, or at a position within the text content. In the last case, the position may be specified by a given numeric argument, or looked for according a given expression. By default, the new element is inserted at the beginning of the target element. An arbitrary other position may be specified with the 'offset' argument, that is either an integer (positive or negative) value, or one of the 'start' and 'end' special indicators. If 'offset' is set to 'start' or 'end', the new element is inserted at the start or at the end, and the other position options are ignored. If 'offset' is a negative integer, the position is counted backward from the end. Caution: if the text of the target container includes tab stops and/or multiple contiguous spaces, the effective offset will be larger than the given one (because ODF tab stops and multiple spaces are special markup elements and not characters). Whatever the value of 'offset', a 'way' option, whose possible values are 'forward' (the default) or 'backward', specifies the search way. If 'offset' is negative, the 'way' option is ignored because the way is always backward. If 'offset' is positive and 'way' is 'backward', then the result is the same as if 'offset' was negative. If 'offset' is 0 or not set and 'way' is 'backward', then the search is done backward from the end. A search string may be provided instead of or in combination with an offset. If so, the insert point will depend on the position of the first substring that matches the given optional search expression (if any). The search expression may be provided through the 'after', 'before', 'replace' or 'capture' option. An expression provided with 'after' or 'before' means that the insert point is immediately after or before the first matching substring. If the search string is provided through 'replace' or 'capture', the matching string will be replaced by the new element. If the option is 'replace' the matching string is just deleted while if 'capture' the same matching string is moved in the new element. Of course, these search string options are mutually exclusive; if more than one of them are wrongly set, only one is considered, and the priority order is 'after', 'before', 'replace', and 'capture'. If both 'capture' and 'text' are set, the result is the same as with 'replace' and 'text'. If the insertion point depends on a search string (i.e. if 'after', 'before', 'replace' or 'capture' is used), it's selected according to the first match. However, it's possible to reverse the search way using the 'way' option. In addition, the search area may be restricted by the 'offset' parameter: if 'offset' is used in combination with any search string option, it. The 'start_mark' optional parameter is a child element that already exists within the context element. If this parameter is set, it specifies that the search will start from the position of this child element and not from the beginning of the end of the context element. If the search way is forward, the insert point (in case of success) will be located after the start mark, but if the search way is backward the insert point will be before the start mark. And if an offset is provided, it's counted from the position of the start mark. Another existing child element may be used in order to restrict the search area, through a 'end_mark' parameter. If this parameter is set, no search will be done beyond it. If both 'start_mark' and 'end_mark' are provided, the search will run from the first one to the second one Of course, if the start mark is located after the end mark, nothing will be done if the search way is not backward, and vice-versa. The following example inserts a new 'text:time' element (i.e. an ODF time field) immediately after the first "Clock:" substring appearing between the 20th character and the end of a given paragraph (specified by the 1st argument). The new element will be a 'text:time', knowing that the namespace prefix of a paragraph element (text:p) is "text". According to the given attributes, the field will display the current time increased by 15 minutes: $doc->setChildElement( $paragraph, 'time', offset => 20, after => "Clock:", attributes => { 'time-value' => odfLocaltime() } ); The variant below creates a the same 'time' field after each occurrence of "Clock:" (probably not very useful, but the aim is to illustrate the use of 'start_mark' in order to ensure that every field but the first one will be inserted after the previous field): my $field = undef; while ( $field = $doc->setChildElement( $paragraph, 'time', after => "Clock:", start_mark => $field, attributes => { 'time-value' => odfLocaltime() } ) {} Note that the loop body is empty; the start mark, which is undef at the first round, is then the previously inserted child element. Caution: without carefully designed offset and/or search option, such a construct may produce a long or infinite loop (until memory fault); in addition, the setChildElements() method (see below) is generally more appropriate for such repetitive element insertions. The next example creates a text span (i.e. a text area with a special character style) for the last "ODF" substring of a given paragraph: $doc->setChildElement( $paragraph, 'span', capture => "ODF", way => 'backward' attributes => { 'style-name' => "My Style" } ); These examples are shown to illustrate the general logic, not necessarily to be reproduced in real applications, knowing that setChildElement() is a common basis for more specialized methods (mainly introduced in the OODoc::Text man page). See also splitContent().
Like setChildElement() but with a repetitive effect that depends on the options. If 'offset' is the only one option, it's used at a regular interval between insert points. If one of the search string options ('after', 'before', 'capture', or 'replace') is set, 'offset' is used once for all to exclude an area from the search space, and not as an interval between the new elements. The other options work like with setChildElement(). The example below inserts a line break after every ";" in a given paragraph (remember that an ODF line break is an element; it's neither an end of paragraph nor a "\n" character): $doc->setChildElements( $paragraph, 'line break', after => ";" );
Like setText() described below, but without translation of "\t" and "\n". For exceptional use only. Allows, for example, the use of the OODoc API with non-OpenDocument XML files.
Sets (or resets) the identifier of the given element. The identifier is namely the 'text:id' attribute, that is allowed for some elements and not for other elements by the ODF standard. OpenOffice::OODoc allows it with any kind of element, and doesn't check its uniqueness, so it may be used with care. A non-conformant element identifier is not an issue if, for example, it's removed before editing or processing the resulting documents through another application. This method removes the identifier if the value argument is undef; however the removeIdentifier() method produces the same result in a more self-documented way).
Updates or creates the coordinates (X, Y) attributes of a visible object (ex: image, text box, frame). See createFrameElement() for the coordinates units and notation.
Updates or creates the litteral description of the given object. Should be used for frames, images or text boxes. Caution: the description is not the same as the printable content of a text box.
Sets or changes the name of the given element according to the given new name. Deletes the name if the given name is undef.
Updates or creates the width and height attributes of a given object. This method makes sense for visible, rectangular objects only, such as the frames, images or text boxes. See createFrameElement() for details about the size units and notation.
Creates a pair of corresponding delimiting markup elements in place, in order to set up an identified text range (such as a range bookmark, an index mark or a table of content mark). The first argument specifies the type of range; it's mandatory but its value is not checked. Examples of legal types are 'bookmark', 'toc-mark', 'alphabetical-index-mark'. If the provided type doesn't contain a semicolon, it's automatically prefixed according to the content of the 'prefix' parameter (whose default is 'text'). The identifier argument id mandatory; it's an arbitrary (preferently unique) identifier for the pair. While this identifier is generally invisible for the end-user, it's sometimes an explicit name (for example in a range bookmark). The 'prefix' optional parameter allows the applications to specify a particular XML prefix; the default prefix for range marks is 'text'. An arbitrary set of attributes may be provided as a hash through an optional 'attributes' parameter. This hash will be processed according to the same logic as with the common setAttributes() method. The 'context' optional parameter, if provided, specifies the element (which should be a text container, such as a paragraph, a heading or a text span) containing the text range to be delimited. However, if the covered text range is spread across two or more text containers, this parameter must not be set, and a separate 'context' parameter must be provided for the start mark and the end mark (see below). If (and only if) the 'context' parameter is set (meaning that the whole text content between the marks belongs to the same element), a 'content' optional parameter allows to provide an expression; if so, the setRangeMark() will look for the first substring that matches this expression in the target element, and in case of success the range marks will be inserted at the beginning and the end of this substring. The search space of the substring may be restricted using the 'offset' and 'way' parameters, according to the same rules as setChildElement(). Note that the 'replace', 'before' and 'after' parameters don't apply with setRangeMark(). Unless 'context' and 'content' are defined, there are two mandatory parameters, namely 'start' and 'end'; each one is a hash of parameters that apply to the start mark and the end mark, respectively. Each one allows the same options as the option hash of setChildElement(), i.e. 'offset', 'before', 'after', 'replace' and/or 'way' as described above. Note that the 'start' and 'end' structures are ignored as soon as the 'context' and 'content' parameters are set at the first level. In addition, if the start and end marks are not contained in the same text element, separate 'context' parameters must be provided with each one of the 'start' hash and the 'end' hash. However, if the 'end' hash doesn't contain any 'context' parameter, the end mark is supposed to be in the same container as the start mark. The method returns the new start and end marks as a list of elements in array context, or the start mark only in scalar context. In case of failure (due to wrong parameters), both are undef, knowing than setRangeMark() creates the full pair of marks or nothing. Note that the optional attributes (provided through the 'attributes' parameter) are stored in the start mark element only. By default, nothing prevents the applications from creating a range mark whose start point is (temporarily or not) located after the end point, so introducing an inconsistency. However, it's possible to set a 'check' boolean option; if this option is 'true', an order check is done and, if something is wrong, the range mark creation is cancelled and the method fails. On the other hand, as long as the application may ensure that it the start will always be set before the end, the order check should be avoided for performance reasons. Caution: The relative positions of the two marks are not checked, so nothing prevents the users from creating a range whose start point is (temporarily or not) located after the end point in the document. The applications should ensure that the 'start' and 'end' options really specify two locations in the right order. The following instruction creates an index mark covering a text area within a single paragraph (previously selected); the range starts before the "abc" substring and ends after the "xyz" substring; the mark identifier is 'ind1234'. Nothing is done if one of these substrings is not present in the target element: $doc->setRangeMark( 'alphabetical-index-mark', 'ind1234', element => $paragraph, start => { before => "abc" }, end => { after => "xyz" } ); The next example creates a range bookmark (i.e. a bookmark covering a text area) that starts before the "abc" substring in a paragraph and ends at the end of another paragraph: $doc->setRangeMark( 'bookmark', 'bm0001', start => { element => $p1, before => "abc" }, end => { element => $p2, offset => 'end' } ); whitespaces are not properly processed by default. A sequence of repeated spaces, whatever its length, is replaced by a single space in the target document. So $doc->setText($p, "Begin End"); produces the same visible result as $doc->setText($p, "Begin End"); It's possible to override this default behaviour using the 'multiple_spaces' document property. If 'multiple_spaces' is set to 'on', the repeated spaces in the example above are properly recorded. However, this optional feature is a the price of some other features and, above all, it have a negative impact on the performances (due to an additional processing of *every* space). Of course, a temporary activation of the 'multiple_spaces' feature is allowed, like in the following example, which sets a content including multiples whitespaces: $doc->{'multiple_spaces'} = 'on'; $doc->setText($p, "Begin End"); $doc->{'multiple_spaces'} = undef; See spaces() and extendText() for a workaround if you need to insert repeated spaces without using the 'multiple_spaces' property.
Creates a new user field declaration in the document. The optional parameter are: 'type' => data type (default 'string') 'value' => initial value (default "") 'currency' => a 3-letter currency code (ex: EUR, USD...) See also setTextField() in OpenOffice::OODoc::Text..
Moves some parts of the text content of the given element and its descendants in new child elements. The tag argument specifies the XML tag of the child elements to be created. Unless this tag is provided with a namespace prefix (or more precisely unless it contains a semicolon), it's automatically concatenated with the namespace prefix of the host element. The following argument is a regular expression that specifies the text substrings to wrap in the new elements. An element is created for every match in the context element and, if any, in its existing children. After these arguments, additional attribute/value pairs may be optionally provided; each one will become an attribute for every created child element (the same name and attributes apply to all). Every attribute name provided without namespace prefix is automatically concatenated to the same namespace prefix as the new elements. This method returns the new child elements as a list. Note that splitContent() is a simplified interface for the mark() method provided by XML::Twig, which may be directly used as an element method for more advanced uses. new element is inserted immediately after the old one. The method returns both the original and the new elements in a list context. In a scalar context, the new element only is returned. Caution: splitElement() works properly on elements containing "flat text" only. It's a bit complicated to use and probably doesn't produce the right effects on elements containing line breaks, tab stops, "styled spans" or any kind of structure. If it's used with an element containing more that one text segment, it works with the first one only.
Returns a special tabulation mark element, available for insertion within an existing text element (knowing that "\t" is not recognized as a tab stop if stored "as is"). The returned element is free, so it could/should be inserted later within a text element.
Reads the stored value of a given user field or changes it if a value is provided. The 1st argument can be either the name of the field (as it appears for the end-user) or a previously loaded user field element. See also getUserField(). This method doesn't create any new user field. It can only read or update an existing one. If the given user field is numeric (ex: date, currency) the returned and/or provided value is the internally stored value, and not the displayed one. Warning: the changes made in a document using userFieldValue() don't necessarily produce visible changes for the end-user. This method can update the internal value of a field, but the displayable representations of this field are not automatically refreshed (it depends on a later field update).
Returns the current value of the given user-defined variable or, if a new value is provided as the second argument, updates the variable accordingly. [Contribution by Andrew Layton]...!
Appends a node as the last child of the calling node. If the argument is an existing node, it's appended as is. If the argument is a string, a new node is created, with the given string as the XML tag name.
Appends a text node (PCDATA) as the last child of the calling element..
Like selectChildElements() below, but returns only the first node matching the filter. Note: the first_child() method of XML::Twig::Elt should be preferred when the filter is the exact tag name of the needed element.
Selects the children with XML tag names matching a given filter. The filter is processed as a regexp. Note: the children() method of XML::Twig::Elt should be preferred if the filter is the exact tag name of the needed elements.
Works with text nodes. In array context, returns the length of the text and the text itself; in scalar context, returns the length only.> 'multiple_spaces' => <'on' or undef, see setText()> ).
Developer/Maintainer: Jean-Marie Gouarne
Contact: jmgdoc@cpan.org
Initial English version of the reference manual by Graeme A. Hunter (graeme.hunter@zen.co.uk).
License: GNU Lesser General Public License v2.1