1RDF::Trine::Node::LiterUasle:r:XCMoLn(t3r)ibuted Perl DoRcDuFm:e:nTtraitnieo:n:Node::Literal::XML(3)
2
3
4

NAME

6       RDF::Trine::Node::Literal::XML - RDF Node class for XMLLiterals
7

METHODS

9       "new ( $node )"
10       "new ( $string [ , $lang, $datatype ] )"
11           Returns a new XML Literal object. This method can be used in two
12           different ways: It can either be passed a string or an XML::LibXML
13           node.
14
15           In the case of passing a string, this method follows the same API
16           as the RDF::Trine::Node::Literal constructor, but:
17
18           ·   $string must be a well-balanced XML fragment =item * $lang is
19               optional, but if a language code is present it will be used as
20               the value of "xml:lang" attribute(s) on the root XML element(s)
21               of the literal. If the element already has an "xml:lang"
22               attribute it will be overwritten. For the node types that
23               doesn't support adding a language, text and CData, a warning
24               will be issued.  =item * $datatype will be ignored and set to
25               'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral'
26
27           In the case of using a XML::LibXML node $node, the Node may be one
28           of these types or a subclass thereof:
29
30           ·   XML::LibXML::Document =item * XML::LibXML::DocumentFragment
31               =item * XML::LibXML::Element =item * XML::LibXML::CDATASection
32               =item * XML::LibXML::NodeList =item * XML::LibXML::Text
33
34           If the string is not a valid XML fragment, and the $node is not of
35           one of the above types, this method throws a RDF::Trine::Error
36           exception.
37
38       "xml_element"
39           Returns the XML::LibXML node for the XML Literal.
40

AUTHOR

42       First created by Gregory Todd Williams <gwilliams@cpan.org>, modfied
43       and maintained by Kjetil Kjernsmo <kjetilk@cpan.org>
44
45
46
47perl v5.30.0                      2019-07-26 RDF::Trine::Node::Literal::XML(3)
Impressum