xml document
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 3150
XML::DOM::Document 1.44
XML::DOM::Document is an XML document node in XML::DOM. more>>
XML::DOM::Document is an XML document node in XML::DOM.
XML::DOM::Document extends XML::DOM::Node.
It is the main root of the XML document structure as returned by XML::DOM::Parser::parse and XML::DOM::Parser::parsefile.
Since elements, text nodes, comments, processing instructions, etc. cannot exist outside the context of a Document, the Document interface also contains the factory methods needed to create these objects. The Node objects created have a getOwnerDocument method which associates them with the Document within whose context they were created.
METHODS
getDocumentElement
This is a convenience method that allows direct access to the child node that is the root Element of the document.
getDoctype
The Document Type Declaration (see DocumentType) associated with this document. For HTML documents as well as XML documents without a document type declaration this returns undef. The DOM Level 1 does not support editing the Document Type Declaration.
Not In DOM Spec: This implementation allows editing the doctype. See XML::DOM::ignoreReadOnly for details.
getImplementation
The DOMImplementation object that handles this document. A DOM application may use objects from multiple implementations.
createElement (tagName)
Creates an element of the type specified. Note that the instance returned implements the Element interface, so attributes can be specified directly on the returned object.
DOMExceptions:
INVALID_CHARACTER_ERR
Raised if the tagName does not conform to the XML spec.
createTextNode (data)
Creates a Text node given the specified string.
createComment (data)
Creates a Comment node given the specified string.
createCDATASection (data)
Creates a CDATASection node given the specified string.
createAttribute (name [, value [, specified ]])
Creates an Attr of the given name. Note that the Attr instance can then be set on an Element using the setAttribute method.
Not In DOM Spec: The DOM Spec does not allow passing the value or the specified property in this method. In this implementation they are optional.
Parameters: value The attributes value. See Attr::setValue for details. If the value is not supplied, the specified property is set to 0. specified Whether the attribute value was specified or whether the default value was used. If not supplied, its assumed to be 1.
DOMExceptions:
INVALID_CHARACTER_ERR
Raised if the name does not conform to the XML spec.
createProcessingInstruction (target, data)
Creates a ProcessingInstruction node given the specified name and data strings.
Parameters: target The target part of the processing instruction. data The data for the node.
DOMExceptions:
INVALID_CHARACTER_ERR
Raised if the target does not conform to the XML spec.
createDocumentFragment
Creates an empty DocumentFragment object.
createEntityReference (name)
Creates an EntityReference object.
<<lessXML::DOM::Document extends XML::DOM::Node.
It is the main root of the XML document structure as returned by XML::DOM::Parser::parse and XML::DOM::Parser::parsefile.
Since elements, text nodes, comments, processing instructions, etc. cannot exist outside the context of a Document, the Document interface also contains the factory methods needed to create these objects. The Node objects created have a getOwnerDocument method which associates them with the Document within whose context they were created.
METHODS
getDocumentElement
This is a convenience method that allows direct access to the child node that is the root Element of the document.
getDoctype
The Document Type Declaration (see DocumentType) associated with this document. For HTML documents as well as XML documents without a document type declaration this returns undef. The DOM Level 1 does not support editing the Document Type Declaration.
Not In DOM Spec: This implementation allows editing the doctype. See XML::DOM::ignoreReadOnly for details.
getImplementation
The DOMImplementation object that handles this document. A DOM application may use objects from multiple implementations.
createElement (tagName)
Creates an element of the type specified. Note that the instance returned implements the Element interface, so attributes can be specified directly on the returned object.
DOMExceptions:
INVALID_CHARACTER_ERR
Raised if the tagName does not conform to the XML spec.
createTextNode (data)
Creates a Text node given the specified string.
createComment (data)
Creates a Comment node given the specified string.
createCDATASection (data)
Creates a CDATASection node given the specified string.
createAttribute (name [, value [, specified ]])
Creates an Attr of the given name. Note that the Attr instance can then be set on an Element using the setAttribute method.
Not In DOM Spec: The DOM Spec does not allow passing the value or the specified property in this method. In this implementation they are optional.
Parameters: value The attributes value. See Attr::setValue for details. If the value is not supplied, the specified property is set to 0. specified Whether the attribute value was specified or whether the default value was used. If not supplied, its assumed to be 1.
DOMExceptions:
INVALID_CHARACTER_ERR
Raised if the name does not conform to the XML spec.
createProcessingInstruction (target, data)
Creates a ProcessingInstruction node given the specified name and data strings.
Parameters: target The target part of the processing instruction. data The data for the node.
DOMExceptions:
INVALID_CHARACTER_ERR
Raised if the target does not conform to the XML spec.
createDocumentFragment
Creates an empty DocumentFragment object.
createEntityReference (name)
Creates an EntityReference object.
Download (0.11MB)
Added: 2006-07-14 License: Perl Artistic License Price:
1200 downloads
XML::Mini::Document 1.2.8
XML::Mini::Document is a Perl implementation of the XML::Mini Document API. more>>
XML::Mini::Document is a Perl implementation of the XML::Mini Document API.
SYNOPSIS
use XML::Mini::Document;
use Data::Dumper;
###### PARSING XML #######
# create a new object
my $xmlDoc = XML::Mini::Document->new();
# init the doc from an XML string
$xmlDoc->parse($XMLString);
# You may use the toHash() method to automatically
# convert the XML into a hash reference
my $xmlHash = $xmlDoc->toHash();
print Dumper($xmlHash);
# You can also manipulate the elements like directly, like this:
# Fetch the ROOT element for the document
# (an instance of XML::Mini::Element)
my $xmlRoot = $xmlDoc->getRoot();
# play with the element and its children
# ...
my $topLevelChildren = $xmlRoot->getAllChildren();
foreach my $childElement (@{$topLevelChildren})
{
# ...
}
###### CREATING XML #######
# Create a new document from scratch
my $newDoc = XML::Mini::Document->new();
# This can be done easily by using a hash:
my $h = {
spy => {
id => 007,
type => SuperSpy,
name => James Bond,
email => mi5@london.uk,
address => Wherever he is needed most,
},
};
$newDoc->fromHash($h);
# Or new XML can also be created by manipulating
#elements directly:
my $newDocRoot = $newDoc->getRoot();
# create the < ? xml ? > header
my $xmlHeader = $newDocRoot->header(xml);
# add the version
$xmlHeader->attribute(version, 1.0);
my $person = $newDocRoot->createChild(person);
my $name = $person->createChild(name);
$name->createChild(first)->text(John);
$name->createChild(last)->text(Doe);
my $eyes = $person->createChild(eyes);
$eyes->attribute(color, blue);
$eyes->attribute(number, 2);
# output the document
print $newDoc->toString();
This example would output :
< ?xml version="1.0"?>
< person>
< name>
< first>
John
< /first>
< last>
Doe
< /last>
< /name>
< eyes color="blue" number="2" />
< /person>
The XML::Mini::Document class is the programmers handle to XML::Mini functionality.
A XML::Mini::Document instance is created in every program that uses XML::Mini. With the XML::Mini::Document object, you can access the root XML::Mini::Element, find/fetch/create elements and read in or output XML strings.
<<lessSYNOPSIS
use XML::Mini::Document;
use Data::Dumper;
###### PARSING XML #######
# create a new object
my $xmlDoc = XML::Mini::Document->new();
# init the doc from an XML string
$xmlDoc->parse($XMLString);
# You may use the toHash() method to automatically
# convert the XML into a hash reference
my $xmlHash = $xmlDoc->toHash();
print Dumper($xmlHash);
# You can also manipulate the elements like directly, like this:
# Fetch the ROOT element for the document
# (an instance of XML::Mini::Element)
my $xmlRoot = $xmlDoc->getRoot();
# play with the element and its children
# ...
my $topLevelChildren = $xmlRoot->getAllChildren();
foreach my $childElement (@{$topLevelChildren})
{
# ...
}
###### CREATING XML #######
# Create a new document from scratch
my $newDoc = XML::Mini::Document->new();
# This can be done easily by using a hash:
my $h = {
spy => {
id => 007,
type => SuperSpy,
name => James Bond,
email => mi5@london.uk,
address => Wherever he is needed most,
},
};
$newDoc->fromHash($h);
# Or new XML can also be created by manipulating
#elements directly:
my $newDocRoot = $newDoc->getRoot();
# create the < ? xml ? > header
my $xmlHeader = $newDocRoot->header(xml);
# add the version
$xmlHeader->attribute(version, 1.0);
my $person = $newDocRoot->createChild(person);
my $name = $person->createChild(name);
$name->createChild(first)->text(John);
$name->createChild(last)->text(Doe);
my $eyes = $person->createChild(eyes);
$eyes->attribute(color, blue);
$eyes->attribute(number, 2);
# output the document
print $newDoc->toString();
This example would output :
< ?xml version="1.0"?>
< person>
< name>
< first>
John
< /first>
< last>
Doe
< /last>
< /name>
< eyes color="blue" number="2" />
< /person>
The XML::Mini::Document class is the programmers handle to XML::Mini functionality.
A XML::Mini::Document instance is created in every program that uses XML::Mini. With the XML::Mini::Document object, you can access the root XML::Mini::Element, find/fetch/create elements and read in or output XML strings.
Download (0.034MB)
Added: 2006-09-14 License: Perl Artistic License Price:
1135 downloads
XML::DOM::DocumentType 1.44
XML::DOM::DocumentType is an XML document type (DTD) in XML::DOM. more>>
XML::DOM::DocumentType is an XML document type (DTD) in XML::DOM.
XML::DOM::DocumentType extends XML::DOM::Node.
Each Document has a doctype attribute whose value is either null or a DocumentType object. The DocumentType interface in the DOM Level 1 Core provides an interface to the list of entities that are defined for the document, and little else because the effect of namespaces and the various XML scheme efforts on DTD representation are not clearly understood as of this writing. The DOM Level 1 doesnt support editing DocumentType nodes.
Not In DOM Spec: This implementation has added a lot of extra functionality to the DOM Level 1 interface. To allow editing of the DocumentType nodes, see XML::DOM::ignoreReadOnly.
<<lessXML::DOM::DocumentType extends XML::DOM::Node.
Each Document has a doctype attribute whose value is either null or a DocumentType object. The DocumentType interface in the DOM Level 1 Core provides an interface to the list of entities that are defined for the document, and little else because the effect of namespaces and the various XML scheme efforts on DTD representation are not clearly understood as of this writing. The DOM Level 1 doesnt support editing DocumentType nodes.
Not In DOM Spec: This implementation has added a lot of extra functionality to the DOM Level 1 interface. To allow editing of the DocumentType nodes, see XML::DOM::ignoreReadOnly.
Download (0.11MB)
Added: 2006-07-17 License: Perl Artistic License Price:
1194 downloads
XML::DOM::Lite::Document 0.10
Document is a XML DOM Lite Document. more>>
Document is a XML DOM Lite Document.
SYNOPSIS
$root = $doc->documentElement;
$node = $doc->getElementById("myid");
# Node creation
$element = $doc->createElement("tagname");
$textnode = $doc->createTextNode("some text");
# XPath
$nlist = $doc->selectNodes("/xpath/expression");
$node = $doc->selectSingleNode("/xpath/expression");
XML::DOM::Lite::Document objects are returned by the Parser and shouldnt generally be instantiated explicitly.
<<lessSYNOPSIS
$root = $doc->documentElement;
$node = $doc->getElementById("myid");
# Node creation
$element = $doc->createElement("tagname");
$textnode = $doc->createTextNode("some text");
# XPath
$nlist = $doc->selectNodes("/xpath/expression");
$node = $doc->selectSingleNode("/xpath/expression");
XML::DOM::Lite::Document objects are returned by the Parser and shouldnt generally be instantiated explicitly.
Download (0.031MB)
Added: 2006-07-14 License: GPL (GNU General Public License) Price:
1197 downloads
XML::Descent 0.0.4
XML::Descent is a Perl module for recursive descent XML parsing. more>>
XML::Descent is a Perl module for recursive descent XML parsing.
SYNOPSIS
use XML::Descent;
# Create parser
my $p = XML::Descent->new({
Input => $xml
});
# Setup handlers
$p->on(folder => sub {
my ($elem, $attr) = @_;
$p->on(url => sub {
my ($elem, $attr) = @_;
my $link = {
name => $attr->{name},
url => $p->text()
};
$p->stash(link => $link);
});
my $folder = $p->walk();
$folder->{name} = $attr->{name};
$p->stash(folder => $folder);
});
# Parse
my $res = $p->walk();
The conventional models for parsing XML are either DOM (a data structure representing the entire document tree is created) or SAX (callbacks are issued for each element in the XML).
XML grammar is recursive - so its nice to be able to write recursive parsers for it. XML::Descent allows such parsers to be created.
Typically a new XML::Descent is created and handlers are defined for elements were interested in
my $p = XML::Descent->new({ Input => $xml });
$p->on(link => sub {
my ($elem, $attr) = @_;
print "Found link: ", $attr->{url}, "n";
$p->walk(); # recurse
});
$p->walk(); # parse
A handler provides a convenient lexical scope that lasts until the closing tag of the element that triggered the handler is reached.
When called at the top level the parsing methods walk(), text() and xml() parse the whole XML document. When called recursively within a handler they parse the portion of the document nested inside node that triggered the handler.
New handlers may be defined within a handler and their scope will be limited to the XML inside the node that triggered the handler.
<<lessSYNOPSIS
use XML::Descent;
# Create parser
my $p = XML::Descent->new({
Input => $xml
});
# Setup handlers
$p->on(folder => sub {
my ($elem, $attr) = @_;
$p->on(url => sub {
my ($elem, $attr) = @_;
my $link = {
name => $attr->{name},
url => $p->text()
};
$p->stash(link => $link);
});
my $folder = $p->walk();
$folder->{name} = $attr->{name};
$p->stash(folder => $folder);
});
# Parse
my $res = $p->walk();
The conventional models for parsing XML are either DOM (a data structure representing the entire document tree is created) or SAX (callbacks are issued for each element in the XML).
XML grammar is recursive - so its nice to be able to write recursive parsers for it. XML::Descent allows such parsers to be created.
Typically a new XML::Descent is created and handlers are defined for elements were interested in
my $p = XML::Descent->new({ Input => $xml });
$p->on(link => sub {
my ($elem, $attr) = @_;
print "Found link: ", $attr->{url}, "n";
$p->walk(); # recurse
});
$p->walk(); # parse
A handler provides a convenient lexical scope that lasts until the closing tag of the element that triggered the handler is reached.
When called at the top level the parsing methods walk(), text() and xml() parse the whole XML document. When called recursively within a handler they parse the portion of the document nested inside node that triggered the handler.
New handlers may be defined within a handler and their scope will be limited to the XML inside the node that triggered the handler.
Download (0.009MB)
Added: 2007-07-31 License: Perl Artistic License Price:
815 downloads
XML::DOM::Element 1.44
XML::DOM::Element is an XML element node in XML::DOM. more>>
XML::DOM::Element is an XML element node in XML::DOM.
XML::DOM::Element extends XML::DOM::Node.
By far the vast majority of objects (apart from text) that authors encounter when traversing a document are Element nodes. Assume the following XML document:
< elementExample id="demo" >
< subelement1/ >
< subelement2 >< subsubelement/ >< /subelement2 >
< /elementExample >
When represented using DOM, the top node is an Element node for "elementExample", which contains two child Element nodes, one for "subelement1" and one for "subelement2". "subelement1" contains no child nodes.
Elements may have attributes associated with them; since the Element interface inherits from Node, the generic Node interface method getAttributes may be used to retrieve the set of all attributes for an element. There are methods on the Element interface to retrieve either an Attr object by name or an attribute value by name.
In XML, where an attribute value may contain entity references, an Attr object should be retrieved to examine the possibly fairly complex sub-tree representing the attribute value. On the other hand, in HTML, where all attributes have simple string values, methods to directly access an attribute value can safely be used as a convenience.
<<lessXML::DOM::Element extends XML::DOM::Node.
By far the vast majority of objects (apart from text) that authors encounter when traversing a document are Element nodes. Assume the following XML document:
< elementExample id="demo" >
< subelement1/ >
< subelement2 >< subsubelement/ >< /subelement2 >
< /elementExample >
When represented using DOM, the top node is an Element node for "elementExample", which contains two child Element nodes, one for "subelement1" and one for "subelement2". "subelement1" contains no child nodes.
Elements may have attributes associated with them; since the Element interface inherits from Node, the generic Node interface method getAttributes may be used to retrieve the set of all attributes for an element. There are methods on the Element interface to retrieve either an Attr object by name or an attribute value by name.
In XML, where an attribute value may contain entity references, an Attr object should be retrieved to examine the possibly fairly complex sub-tree representing the attribute value. On the other hand, in HTML, where all attributes have simple string values, methods to directly access an attribute value can safely be used as a convenience.
Download (0.11MB)
Added: 2006-07-17 License: GPL (GNU General Public License) Price:
1194 downloads
XML::DOM 1.44
XML::DOM is a perl module for building DOM Level 1 compliant document structures. more>>
XML::DOM is a perl module for building DOM Level 1 compliant document structures.
SYNOPSIS
use XML::DOM;
my $parser = new XML::DOM::Parser;
my $doc = $parser->parsefile ("file.xml");
# print all HREF attributes of all CODEBASE elements
my $nodes = $doc->getElementsByTagName ("CODEBASE");
my $n = $nodes->getLength;
for (my $i = 0; $i < $n; $i++)
{
my $node = $nodes->item ($i);
my $href = $node->getAttributeNode ("HREF");
print $href->getValue . "n";
}
# Print doc file
$doc->printToFile ("out.xml");
# Print to string
print $doc->toString;
# Avoid memory leaks - cleanup circular references for garbage collection
$doc->dispose;
This module extends the XML::Parser module by Clark Cooper. The XML::Parser module is built on top of XML::Parser::Expat, which is a lower level interface to James Clarks expat library.
XML::DOM::Parser is derived from XML::Parser. It parses XML strings or files and builds a data structure that conforms to the API of the Document Object Model as described at http://www.w3.org/TR/REC-DOM-Level-1. See the XML::Parser manpage for other available features of the XML::DOM::Parser class. Note that the Style property should not be used (it is set internally.)
The XML::Parser NoExpand option is more or less supported, in that it will generate EntityReference objects whenever an entity reference is encountered in character data. Im not sure how useful this is. Any comments are welcome.
As described in the synopsis, when you create an XML::DOM::Parser object, the parse and parsefile methods create an XML::DOM::Document object from the specified input. This Document object can then be examined, modified and written back out to a file or converted to a string.
When using XML::DOM with XML::Parser version 2.19 and up, setting the XML::DOM::Parser option KeepCDATA to 1 will store CDATASections in CDATASection nodes, instead of converting them to Text nodes. Subsequent CDATASection nodes will be merged into one. Let me know if this is a problem.
When using XML::Parser 2.27 and above, you can suppress expansion of parameter entity references (e.g. %pent;) in the DTD, by setting ParseParamEnt to 1 and ExpandParamEnt to 0. See Hidden Nodes for details.
A Document has a tree structure consisting of Node objects. A Node may contain other nodes, depending on its type. A Document may have Element, Text, Comment, and CDATASection nodes. Element nodes may have Attr, Element, Text, Comment, and CDATASection nodes. The other nodes may not have any child nodes.
This module adds several node types that are not part of the DOM spec (yet.) These are: ElementDecl (for < !ELEMENT ... > declarations), AttlistDecl (for < !ATTLIST ... > declarations), XMLDecl (for < ?xml ...? > declarations) and AttDef (for attribute definitions in an AttlistDecl.)
<<lessSYNOPSIS
use XML::DOM;
my $parser = new XML::DOM::Parser;
my $doc = $parser->parsefile ("file.xml");
# print all HREF attributes of all CODEBASE elements
my $nodes = $doc->getElementsByTagName ("CODEBASE");
my $n = $nodes->getLength;
for (my $i = 0; $i < $n; $i++)
{
my $node = $nodes->item ($i);
my $href = $node->getAttributeNode ("HREF");
print $href->getValue . "n";
}
# Print doc file
$doc->printToFile ("out.xml");
# Print to string
print $doc->toString;
# Avoid memory leaks - cleanup circular references for garbage collection
$doc->dispose;
This module extends the XML::Parser module by Clark Cooper. The XML::Parser module is built on top of XML::Parser::Expat, which is a lower level interface to James Clarks expat library.
XML::DOM::Parser is derived from XML::Parser. It parses XML strings or files and builds a data structure that conforms to the API of the Document Object Model as described at http://www.w3.org/TR/REC-DOM-Level-1. See the XML::Parser manpage for other available features of the XML::DOM::Parser class. Note that the Style property should not be used (it is set internally.)
The XML::Parser NoExpand option is more or less supported, in that it will generate EntityReference objects whenever an entity reference is encountered in character data. Im not sure how useful this is. Any comments are welcome.
As described in the synopsis, when you create an XML::DOM::Parser object, the parse and parsefile methods create an XML::DOM::Document object from the specified input. This Document object can then be examined, modified and written back out to a file or converted to a string.
When using XML::DOM with XML::Parser version 2.19 and up, setting the XML::DOM::Parser option KeepCDATA to 1 will store CDATASections in CDATASection nodes, instead of converting them to Text nodes. Subsequent CDATASection nodes will be merged into one. Let me know if this is a problem.
When using XML::Parser 2.27 and above, you can suppress expansion of parameter entity references (e.g. %pent;) in the DTD, by setting ParseParamEnt to 1 and ExpandParamEnt to 0. See Hidden Nodes for details.
A Document has a tree structure consisting of Node objects. A Node may contain other nodes, depending on its type. A Document may have Element, Text, Comment, and CDATASection nodes. Element nodes may have Attr, Element, Text, Comment, and CDATASection nodes. The other nodes may not have any child nodes.
This module adds several node types that are not part of the DOM spec (yet.) These are: ElementDecl (for < !ELEMENT ... > declarations), AttlistDecl (for < !ATTLIST ... > declarations), XMLDecl (for < ?xml ...? > declarations) and AttDef (for attribute definitions in an AttlistDecl.)
Download (0.14MB)
Added: 2006-07-14 License: GPL (GNU General Public License) Price:
1200 downloads
XML::DocStats 0.01
XML::DocStats is a Perl module to produce a simple analysis of an XML document. more>>
XML::DocStats is a Perl module to produce a simple analysis of an XML document.
SYNOPSIS
Analyze the xml document on STDIN, the STDOUT output format is html:
use XML::DocStats;
my $parse = XML::DocStats->new;
$parse->analyze;
Analyze in-memory xml document:
use XML::DocStats;
my ($xmldata) = @_;
my $parse = XML::DocStats->new(xmlsource=>{String => $xmldata},
BYTES => length($xmldata));
$parse->analyze;
Analyze xml document IO stream, the output format is plain text:
use XML::DocStats;
use IO::File;
my $xmlsource = IO::File->new("< document.xml");
my $parse = XML::DocStats->new(xmlsource=>{ByteStream => $xmlsource});
$parse->format(text);
$parse->analyze;
XML::DocStats parses an xml document using a SAX handler built using Ken MacLeods XML::Parser::PerlSAX. It produces a listing indented to show the element heirarchy, and collects counts of various xml components along the way. A summary of the counts is produced following the conclusion of the parse. This is useful to visualize the structure and content of an XML document.
The output listing is either in plain text or html.
Each xml thingy is color-coded in the html output for easy reading:
- purple denotes elements.
- blue denotes text (character data). The text itself is black.
- olive denotes attributes and attribute valuesin elements, XML-DCL, DOCTYPE, and PIs.
- fuchsia denotes entity references. The name of the entity is in black. fuchsia is also used to denote the root element, and to mark the start and finish of the parse, as well as to label the statistices at the end.
- teal denotes the XML declaration.
- navy denotes the DOCTYPE declaration.
- maroon denotes PIs (processing instructions).
- green denotes comments. The text of the comment is black.
- red denotes error messages should the xml fail to be well-formed.
<<lessSYNOPSIS
Analyze the xml document on STDIN, the STDOUT output format is html:
use XML::DocStats;
my $parse = XML::DocStats->new;
$parse->analyze;
Analyze in-memory xml document:
use XML::DocStats;
my ($xmldata) = @_;
my $parse = XML::DocStats->new(xmlsource=>{String => $xmldata},
BYTES => length($xmldata));
$parse->analyze;
Analyze xml document IO stream, the output format is plain text:
use XML::DocStats;
use IO::File;
my $xmlsource = IO::File->new("< document.xml");
my $parse = XML::DocStats->new(xmlsource=>{ByteStream => $xmlsource});
$parse->format(text);
$parse->analyze;
XML::DocStats parses an xml document using a SAX handler built using Ken MacLeods XML::Parser::PerlSAX. It produces a listing indented to show the element heirarchy, and collects counts of various xml components along the way. A summary of the counts is produced following the conclusion of the parse. This is useful to visualize the structure and content of an XML document.
The output listing is either in plain text or html.
Each xml thingy is color-coded in the html output for easy reading:
- purple denotes elements.
- blue denotes text (character data). The text itself is black.
- olive denotes attributes and attribute valuesin elements, XML-DCL, DOCTYPE, and PIs.
- fuchsia denotes entity references. The name of the entity is in black. fuchsia is also used to denote the root element, and to mark the start and finish of the parse, as well as to label the statistices at the end.
- teal denotes the XML declaration.
- navy denotes the DOCTYPE declaration.
- maroon denotes PIs (processing instructions).
- green denotes comments. The text of the comment is black.
- red denotes error messages should the xml fail to be well-formed.
Download (0.027MB)
Added: 2006-09-07 License: Perl Artistic License Price:
1143 downloads
XML::DOM::Node 1.44
XML::DOM::Node is a super class of all nodes in XML::DOM. more>>
XML::DOM::Node is a super class of all nodes in XML::DOM.
XML::DOM::Node is the super class of all nodes in an XML::DOM document. This means that all nodes that subclass XML::DOM::Node also inherit all the methods that XML::DOM::Node implements.
GLOBAL VARIABLES
@NodeNames
The variable @XML::DOM::Node::NodeNames maps the node type constants to strings. It is used by XML::DOM::Node::getNodeTypeName.
<<lessXML::DOM::Node is the super class of all nodes in an XML::DOM document. This means that all nodes that subclass XML::DOM::Node also inherit all the methods that XML::DOM::Node implements.
GLOBAL VARIABLES
@NodeNames
The variable @XML::DOM::Node::NodeNames maps the node type constants to strings. It is used by XML::DOM::Node::getNodeTypeName.
Download (0.11MB)
Added: 2006-07-17 License: Perl Artistic License Price:
1194 downloads
XML::Output 0.03
XML::Output is a Perl module for writing simple XML documents. more>>
XML::Output is a Perl module for writing simple XML documents.
SYNOPSIS
use XML::Output;
open(FH,>file.xml);
my $xo = new XML::Output({fh => *FH});
$xo->open(tagname, {attrname => attrval});
$xo->pcdata(element content);
$xo->close();
close(FH);
ABSTRACT
XML::Output is a Perl module for writing simple XML documents
XML::Output is a Perl module for writing simple XML document. The following methods are provided.
new
$xo = new XML::Output;
Constructs a new XML::Output object.
open
$xo->open(tagname, {attrname => attrval});
Open an element with specified name (and optional attributes)
close
$xo->close;
Close an element
empty
$xo->empty(tagname, {attrname => attrval});
Insert an empty element with specified name (and optional attributes)
pcdata
$xo->pcdata(element content);
Insert text
comment
$xo->comment(comment text);
Insert a comment
xmlstr
print $xo->xmlstr;
Get a string representation of the constructed document
<<lessSYNOPSIS
use XML::Output;
open(FH,>file.xml);
my $xo = new XML::Output({fh => *FH});
$xo->open(tagname, {attrname => attrval});
$xo->pcdata(element content);
$xo->close();
close(FH);
ABSTRACT
XML::Output is a Perl module for writing simple XML documents
XML::Output is a Perl module for writing simple XML document. The following methods are provided.
new
$xo = new XML::Output;
Constructs a new XML::Output object.
open
$xo->open(tagname, {attrname => attrval});
Open an element with specified name (and optional attributes)
close
$xo->close;
Close an element
empty
$xo->empty(tagname, {attrname => attrval});
Insert an empty element with specified name (and optional attributes)
pcdata
$xo->pcdata(element content);
Insert text
comment
$xo->comment(comment text);
Insert a comment
xmlstr
print $xo->xmlstr;
Get a string representation of the constructed document
Download (0.035MB)
Added: 2006-09-07 License: GPL (GNU General Public License) Price:
1144 downloads
XML::DOM::XMLDecl 1.44
XML::DOM::XMLDecl is a XML declaration in XML::DOM. more>>
XML::DOM::XMLDecl is a XML declaration in XML::DOM.
XML::DOM::XMLDecl extends XML::DOM::Node, but is not part of the DOM Level 1 specification.
It contains the XML declaration, e.g.
< ?xml version="1.0" encoding="UTF-16" standalone="yes"? >
See also XML::DOM::Document::getXMLDecl.
METHODS
getVersion and setVersion (version)
Returns and sets the XML version. At the time of this writing the version should always be "1.0"
getEncoding and setEncoding (encoding)
undef may be specified for the encoding value.
getStandalone and setStandalone (standalone)
undef may be specified for the standalone value.
<<lessXML::DOM::XMLDecl extends XML::DOM::Node, but is not part of the DOM Level 1 specification.
It contains the XML declaration, e.g.
< ?xml version="1.0" encoding="UTF-16" standalone="yes"? >
See also XML::DOM::Document::getXMLDecl.
METHODS
getVersion and setVersion (version)
Returns and sets the XML version. At the time of this writing the version should always be "1.0"
getEncoding and setEncoding (encoding)
undef may be specified for the encoding value.
getStandalone and setStandalone (standalone)
undef may be specified for the standalone value.
Download (0.11MB)
Added: 2006-07-20 License: Perl Artistic License Price:
1191 downloads
XML::Mini::Element 1.2.8
XML::Mini::Element is a Perl implementation of the XML::Mini Element API. more>>
XML::Mini::Element is a Perl implementation of the XML::Mini Element API.
SYNOPSIS
use XML::Mini::Document;
my $xmlDoc = XML::Mini::Document->new();
# Fetch the ROOT element for the document
# (an instance of XML::Mini::Element)
my $xmlElement = $xmlDoc->getRoot();
# Create an tag
my $xmlHeader = $xmlElement->header(xml);
# add the version to get<<less
SYNOPSIS
use XML::Mini::Document;
my $xmlDoc = XML::Mini::Document->new();
# Fetch the ROOT element for the document
# (an instance of XML::Mini::Element)
my $xmlElement = $xmlDoc->getRoot();
# Create an tag
my $xmlHeader = $xmlElement->header(xml);
# add the version to get<<less
Download (0.034MB)
Added: 2007-03-08 License: Perl Artistic License Price:
961 downloads
XML::Code 0.04
XML::Diff is a Perl module for XML DOM-Tree based Diff & Patch Module. more>>
XML::Diff is a Perl module for XML DOM-Tree based Diff & Patch Module.
SYNOPSIS
my $diff = XML::Diff->new();
# to generate a diffgram of two XML files, use compare.
# $old and $new can be filepaths, XML as a string,
# XML::LibXML::Document or XML::LibXML::Element objects.
# The diffgram is a XML::LibXML::Document by default.
my $diffgram = $diff->compare(
-old => $old_xml,
-new => $new_xml,
);
# To patch an XML document, an patch. $old and $diffgram
# follow the same formatting rules as compare.
# The resulting XML is a XML::LibXML::Document by default.
my $patched = $diff->patch(
-old => $old,
-diffgram => $diffgram,
);
This module provides methods for generating and applying an XML diffgram of two related XML files. The basis of the algorithm is tree-wise comparison using the DOM model as provided by XML::LibXML.
The Diffgram is well-formed XML in the XVCS namespance and supports update, insert, delete and move operations. It is meant to be human and machine readable. It uses XPath expressions for locating the nodes to operate on.
<<lessSYNOPSIS
my $diff = XML::Diff->new();
# to generate a diffgram of two XML files, use compare.
# $old and $new can be filepaths, XML as a string,
# XML::LibXML::Document or XML::LibXML::Element objects.
# The diffgram is a XML::LibXML::Document by default.
my $diffgram = $diff->compare(
-old => $old_xml,
-new => $new_xml,
);
# To patch an XML document, an patch. $old and $diffgram
# follow the same formatting rules as compare.
# The resulting XML is a XML::LibXML::Document by default.
my $patched = $diff->patch(
-old => $old,
-diffgram => $diffgram,
);
This module provides methods for generating and applying an XML diffgram of two related XML files. The basis of the algorithm is tree-wise comparison using the DOM model as provided by XML::LibXML.
The Diffgram is well-formed XML in the XVCS namespance and supports update, insert, delete and move operations. It is meant to be human and machine readable. It uses XPath expressions for locating the nodes to operate on.
Download (0.017MB)
Added: 2006-09-14 License: Perl Artistic License Price:
1138 downloads
Structured Document Validator 0.7.9
Structured Document Validator project implements a generalized method for structured documents. more>>
Structured Document Validator project implements a generalized method for validating both the structure and content of structured documents.
Any data format that can be deterministically divided into tags and data is classed as a structured document. This definition applies to a wide array of data formats, including XML, Java properties files, and delimited value files.
The application performs validations based on user-defined Structured Document Definitions (SDDs). It provides an environment for validation, SDD development, and document editing.
<<lessAny data format that can be deterministically divided into tags and data is classed as a structured document. This definition applies to a wide array of data formats, including XML, Java properties files, and delimited value files.
The application performs validations based on user-defined Structured Document Definitions (SDDs). It provides an environment for validation, SDD development, and document editing.
Download (0.59MB)
Added: 2006-01-06 License: LGPL (GNU Lesser General Public License) Price:
1387 downloads
XML::DOM::BagOfTricks 0.05
XML::DOM::BagOfTricks is a convenient XML DOM. more>>
XML::DOM::BagOfTricks is a convenient XML DOM.
SYNOPSIS
use XML::DOM::BagOfTricks;
# get the XML document and root element
my ($doc,$root) = createDocument(Foo);
# or
# get the XML document with xmlns and version attributes specified
my $doc = createDocument({name=>Foo, xmlns=>http://www.other.org/namespace, version=>1.3});
# get a text element like Bar
my $node = createTextElement($doc,Foo,Bar);
# get an element like
my $node = createElement($doc,Foo,isBar=>0, isFoo=>1);
# get a nice element with attributes that contains a text node Bar
my $foo_elem = createElementwithText($DOMDocument,Foo,Bar,isFoo=>1,isBar=>0);
# add attributes to a node
addAttributes($node,foo=>true,bar=>32);
# add text to a node
addText($node,This is some text);
# add more elements to a node
addElements($node,$another_node,$yet_another_node);
# adds two text nodes to a node
addTextElements($node,Foo=>some text,Bar=>some more text);
# creates new XML:DOM::Elements and adds them to $node
addElements($node,{ name=>Foo, xlink=> cid:.. },{ .. });
# extracts the text content of a node (and its subnodes)
my $content = getTextContents($node);
XML::DOM::BagOfTricks provides a bundle, or bag, of functions that make dealing with and creating DOM objects easier.
The goal of this BagOfTricks is to deal with DOM and XML in a more perl friendly manner, using native idioms to fit in with the rest of a perl program.
As of version 0.02 the API has changed to be clearer and more in line with the DOM API in general, now using createFoo instead of getFoo to create new elements, documents, etc.
<<lessSYNOPSIS
use XML::DOM::BagOfTricks;
# get the XML document and root element
my ($doc,$root) = createDocument(Foo);
# or
# get the XML document with xmlns and version attributes specified
my $doc = createDocument({name=>Foo, xmlns=>http://www.other.org/namespace, version=>1.3});
# get a text element like Bar
my $node = createTextElement($doc,Foo,Bar);
# get an element like
my $node = createElement($doc,Foo,isBar=>0, isFoo=>1);
# get a nice element with attributes that contains a text node Bar
my $foo_elem = createElementwithText($DOMDocument,Foo,Bar,isFoo=>1,isBar=>0);
# add attributes to a node
addAttributes($node,foo=>true,bar=>32);
# add text to a node
addText($node,This is some text);
# add more elements to a node
addElements($node,$another_node,$yet_another_node);
# adds two text nodes to a node
addTextElements($node,Foo=>some text,Bar=>some more text);
# creates new XML:DOM::Elements and adds them to $node
addElements($node,{ name=>Foo, xlink=> cid:.. },{ .. });
# extracts the text content of a node (and its subnodes)
my $content = getTextContents($node);
XML::DOM::BagOfTricks provides a bundle, or bag, of functions that make dealing with and creating DOM objects easier.
The goal of this BagOfTricks is to deal with DOM and XML in a more perl friendly manner, using native idioms to fit in with the rest of a perl program.
As of version 0.02 the API has changed to be clearer and more in line with the DOM API in general, now using createFoo instead of getFoo to create new elements, documents, etc.
Download (0.006MB)
Added: 2006-07-14 License: Perl Artistic License Price:
1197 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above xml document search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed