Debian Codegraph @

README

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