.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" 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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . 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 "LaTeXML::Common::XML 3pm" .TH LaTeXML::Common::XML 3pm 2024-02-27 "perl v5.38.2" "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 "LaTeXML::Common::XML" \- XML utilities .SH DESCRIPTION .IX Header "DESCRIPTION" This module provides utilities for accessing XML, along with some patches to XML::LibXML. .ie n .IP element_nodes($node) 4 .el .IP \f(CWelement_nodes($node)\fR 4 .IX Item "element_nodes($node)" Returns a list of the element children of \f(CW$node\fR. .ie n .IP text_in_node($node) 4 .el .IP \f(CWtext_in_node($node)\fR 4 .IX Item "text_in_node($node)" Returns the string combining the text nodes within \f(CW$node\fR. .ie n .IP isTeXtNode($node) 4 .el .IP \f(CWisTeXtNode($node)\fR 4 .IX Item "isTeXtNode($node)" Checks whether \f(CW$node\fR is a text node. .ie n .IP isElementNode($node) 4 .el .IP \f(CWisElementNode($node)\fR 4 .IX Item "isElementNode($node)" Checks whether \f(CW$node\fR is a element node. .ie n .IP """isChild($child,$parent)""" 4 .el .IP \f(CWisChild($child,$parent)\fR 4 .IX Item "isChild($child,$parent)" Checks whether \f(CW$child\fR is a child of \f(CW$parent\fR. .ie n .IP """isDecscendant($child,$parent)""" 4 .el .IP \f(CWisDecscendant($child,$parent)\fR 4 .IX Item "isDecscendant($child,$parent)" Checks whether \f(CW$child\fR is a descendant of \f(CW$parent\fR. .ie n .IP """isDecscendantOrSelf($child,$parent)""" 4 .el .IP \f(CWisDecscendantOrSelf($child,$parent)\fR 4 .IX Item "isDecscendantOrSelf($child,$parent)" Checks whether \f(CW$child\fR is a descendant of, or the same as, \f(CW$parent\fR. .ie n .IP """new_node($nsURI,$tag,$children,%attributes)""" 4 .el .IP \f(CWnew_node($nsURI,$tag,$children,%attributes)\fR 4 .IX Item "new_node($nsURI,$tag,$children,%attributes)" Creates a new element node with tag \f(CW$tag\fR (in the namespace \f(CW$nsURI\fR), with the children in the array ref \f(CW$children\fR (if any) and assigning the given attributes. .ie n .IP """append_nodes($node,@children)""" 4 .el .IP \f(CWappend_nodes($node,@children)\fR 4 .IX Item "append_nodes($node,@children)" Appends the given children to \f(CW$node\fR. .ie n .IP clear_node($node) 4 .el .IP \f(CWclear_node($node)\fR 4 .IX Item "clear_node($node)" Removes all element and text children from \f(CW$node\fR. .ie n .IP maybe_clone($node) 4 .el .IP \f(CWmaybe_clone($node)\fR 4 .IX Item "maybe_clone($node)" Clones \f(CW$node\fR if it has a parent, otherwise returns it. .ie n .IP """copy_attributes($to,$from)""" 4 .el .IP \f(CWcopy_attributes($to,$from)\fR 4 .IX Item "copy_attributes($to,$from)" Copy all attributes from \f(CW$from\fR to \f(CW$to\fR. .ie n .IP """rename_attribute($node,$from,$to)""" 4 .el .IP \f(CWrename_attribute($node,$from,$to)\fR 4 .IX Item "rename_attribute($node,$from,$to)" Rename the attribute \f(CW$from\fR to \f(CW$to\fR on the node \f(CW$node\fR. .ie n .IP """remove_attr($node,@attr)""" 4 .el .IP \f(CWremove_attr($node,@attr)\fR 4 .IX Item "remove_attr($node,@attr)" Remove the given attributes from \f(CW$node\fR. .ie n .IP """get_attr($node,@attr)""" 4 .el .IP \f(CWget_attr($node,@attr)\fR 4 .IX Item "get_attr($node,@attr)" Returns the list of values for the given attributes on \f(CW$node\fR .ie n .IP initialize_catalogs() 4 .el .IP \f(CWinitialize_catalogs()\fR 4 .IX Item "initialize_catalogs()" Initialize XML::LibXML to recognize the catalogs given in LaTeXML.catalogs. .ie n .IP """set_RDFa_prefixes($document,$map)""" 4 .el .IP \f(CWset_RDFa_prefixes($document,$map)\fR 4 .IX Item "set_RDFa_prefixes($document,$map)" This method scans the document's RDFa attributes, extracting the prefixes used. These prefixes are then filtered through a \f(CW$map\fR of known RDFa prefixes and the ones allowed are declared globally for the document via the \f(CW\*(C`prefix\*(C'\fR attribute of its root element. .SH AUTHOR .IX Header "AUTHOR" Bruce Miller , Deyan Ginev .SH COPYRIGHT .IX Header "COPYRIGHT" Public domain software, produced as part of work done by the United States Government & not subject to copyright in the US.