File: README

package info (click to toggle)
librdf-trine-node-literal-xml-perl 0.16-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 228 kB
  • ctags: 136
  • sloc: perl: 1,511; makefile: 13
file content (40 lines) | stat: -rw-r--r-- 1,742 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
NAME
    RDF::Trine::Node::Literal::XML - RDF Node class for XMLLiterals

METHODS
    "new ( $node )"
    "new ( $string [ , $lang, $datatype ] )"
        Returns a new XML Literal object. This method can be used in two
        different ways: It can either be passed a string or an XML::LibXML
        node.

        In the case of passing a string, this method follows the same API as
        the RDF::Trine::Node::Literal constructor, but:

        *   $string must be a well-balanced XML fragment =item * $lang is
            optional, but if a language code is present it will be used as
            the value of "xml:lang" attribute(s) on the root XML element(s)
            of the literal. If the element already has an "xml:lang"
            attribute it will be overwritten. For the node types that
            doesn't support adding a language, text and CData, a warning
            will be issued. =item * $datatype will be ignored and set to
            'http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral'

        In the case of using a XML::LibXML node $node, the Node may be one
        of these types or a subclass thereof:

        *   XML::LibXML::Document =item * XML::LibXML::DocumentFragment
            =item * XML::LibXML::Element =item * XML::LibXML::CDATASection
            =item * XML::LibXML::NodeList =item * XML::LibXML::Text

        If the string is not a valid XML fragment, and the $node is not of
        one of the above types, this method throws a RDF::Trine::Error
        exception.

    "xml_element"
        Returns the XML::LibXML node for the XML Literal.

AUTHOR
    First created by Gregory Todd Williams <gwilliams@cpan.org>, modfied and
    maintained by Kjetil Kjernsmo <kjetilk@cpan.org>