dom trees
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 1141
myXTree 1.0
myXTree provides an interface to an SQL tree. more>>
myXTree provides an interface to an SQL tree.
myXTree is an interface to a SQL-tree. It is more about SQL-trees can learn in article SQL for Smarties and Relational Data Structures for Extensible Thesauri. This class allows to save the DOM-document in a SQL-tree and vice versa. For a choice of the data from a SQL-tree are used XPath expressions. Data reading of a SQL-tree can be carried out by two ways: by one SQL-query and recursive way.
The myXTree class use object PEAR::DB and object Document from package myDOM, which goes into package myXML.
Attached to realization of this class used a database mySQL and object PEAR::DB, but this, to regretting, does not do a class lightly bearable on other databases, because in class are used the specialized features mySQL. Because supposed, in the main, use of this class for little renewed data, then was select a tables type MyISAM (unsupported transaction).
A class does not support full features of XPath language. So far does not support an objects selection on namespace prefix; in base saved only the elements, text, CDATA and attributes; use of operator ??? (union) impossible only in recursive method; the XPath functions not implemented.
Enhancements:
- Error handling is completely advanced. PEAR style of error handling is extended with a new class "Error" (see file Error.php for details).
- The code became easier for understanding and for debugging.
<<lessmyXTree is an interface to a SQL-tree. It is more about SQL-trees can learn in article SQL for Smarties and Relational Data Structures for Extensible Thesauri. This class allows to save the DOM-document in a SQL-tree and vice versa. For a choice of the data from a SQL-tree are used XPath expressions. Data reading of a SQL-tree can be carried out by two ways: by one SQL-query and recursive way.
The myXTree class use object PEAR::DB and object Document from package myDOM, which goes into package myXML.
Attached to realization of this class used a database mySQL and object PEAR::DB, but this, to regretting, does not do a class lightly bearable on other databases, because in class are used the specialized features mySQL. Because supposed, in the main, use of this class for little renewed data, then was select a tables type MyISAM (unsupported transaction).
A class does not support full features of XPath language. So far does not support an objects selection on namespace prefix; in base saved only the elements, text, CDATA and attributes; use of operator ??? (union) impossible only in recursive method; the XPath functions not implemented.
Enhancements:
- Error handling is completely advanced. PEAR style of error handling is extended with a new class "Error" (see file Error.php for details).
- The code became easier for understanding and for debugging.
Download (0.054MB)
Added: 2007-04-04 License: LGPL (GNU Lesser General Public License) Price:
935 downloads
kdtree 0.5.2
kdtree project is a simple C library for working with KD-Trees. more>>
kdtree project is a simple C library for working with KD-Trees.
Kd-trees are an extension of binary search trees to k-dimensional data. They facilitate very fast searching, and nearest-neighbor queries.
This particular implementation is designed to be efficient and very easy to use. It is completely written in ANSI/ISO C, and thus completely cross-platform.
Enhancements:
- This release fixes both reported bugs, and adds a contributed, more extensive, and well commented example program.
<<lessKd-trees are an extension of binary search trees to k-dimensional data. They facilitate very fast searching, and nearest-neighbor queries.
This particular implementation is designed to be efficient and very easy to use. It is completely written in ANSI/ISO C, and thus completely cross-platform.
Enhancements:
- This release fixes both reported bugs, and adds a contributed, more extensive, and well commented example program.
Download (0.007MB)
Added: 2007-07-26 License: BSD License Price:
831 downloads
DOM Menu 0.3.2
DOM Menu is a hierarchical JavaScript popup menus. more>>
DOM Menu allows developers to add dynamic, hierarchical popup menus on their web pages. The direction of the menu can either be horizontal or vertical and the menu can open (or popout) in either direction. It has both screen edge detection and < select > element detection (for browsers that cannot hide these form elements).
The styles for the menu items are contr olled almost entirely through CSS and the menus are created/hidden using the DOM (Document Object M odel).
Menu configuration is done using a custom Hash() class and is very portable from a PHP type array structure. The menus attempt to follow the look and feel of well known GUI toolkit menus.
Version restrictions:
- cannot use opposite direction to open
- opera 7 having difficulty with table (need to work around)
Enhancements:
- added support for IE 5.0
- fixed problem when submenu was deactivated and parent would highlight
- added a converter from phplayersmenu
<<lessThe styles for the menu items are contr olled almost entirely through CSS and the menus are created/hidden using the DOM (Document Object M odel).
Menu configuration is done using a custom Hash() class and is very portable from a PHP type array structure. The menus attempt to follow the look and feel of well known GUI toolkit menus.
Version restrictions:
- cannot use opposite direction to open
- opera 7 having difficulty with table (need to work around)
Enhancements:
- added support for IE 5.0
- fixed problem when submenu was deactivated and parent would highlight
- added a converter from phplayersmenu
Download (0.045MB)
Added: 2005-05-05 License: LGPL (GNU Lesser General Public License) Price:
1633 downloads
STX B+ Tree 0.8
STX B+ Tree project is a set of C++ template classes implementing a B+ tree key/data container in main memory. more>>
STX B+ Tree project is a set of C++ template classes implementing a B+ tree key/data container in main memory. The classes are designed as drop-in replacements of the STL containers set, map, multiset and multimap and follow their interfaces very closely. By packing multiple value pairs into each node of the tree the B+ tree reduces heap fragmentation and utilizes cache-line effects better than the standard red-black binary tree.
The tree algorithms are based on the implementation in Cormen, Leiserson and Rivests Introduction into Algorithms, Jan Janninks paper and other algorithm resources. The classes contain extensive assertion and verification mechanisms to ensure the implementations correctness by testing the tree invariants.
The main B+ tree implementation can be found in doxygen stx/btree.h or with plain text comments btree.h.
Special interest was put into performing a speed comparison test between the standard red-black tree and the new B+ tree implementation. The speed test results are interesting and show the B+ tree to be significantly faster.
Enhancements:
- This release introduces the demonstration program wxBTreeDemo.
- This program draws illustrations of the B+ trees constructed by the STX B+ Tree template classes.
- It allows the user to select different types of B+ tree instantiations: integer or string keys and different slot numbers.
- The user may insert and erase key/data pairs from the tree and run different search operations.
- The demo program uses the cross-platform wxWidgets toolkit and can be compiled on Linux, Windows, and Mac OS X.
<<lessThe tree algorithms are based on the implementation in Cormen, Leiserson and Rivests Introduction into Algorithms, Jan Janninks paper and other algorithm resources. The classes contain extensive assertion and verification mechanisms to ensure the implementations correctness by testing the tree invariants.
The main B+ tree implementation can be found in doxygen stx/btree.h or with plain text comments btree.h.
Special interest was put into performing a speed comparison test between the standard red-black tree and the new B+ tree implementation. The speed test results are interesting and show the B+ tree to be significantly faster.
Enhancements:
- This release introduces the demonstration program wxBTreeDemo.
- This program draws illustrations of the B+ trees constructed by the STX B+ Tree template classes.
- It allows the user to select different types of B+ tree instantiations: integer or string keys and different slot numbers.
- The user may insert and erase key/data pairs from the tree and run different search operations.
- The demo program uses the cross-platform wxWidgets toolkit and can be compiled on Linux, Windows, and Mac OS X.
Download (0.36MB)
Added: 2007-05-15 License: LGPL (GNU Lesser General Public License) Price:
548 downloads
jstree 0.8b2
jstree is a JavaScript that allows you to see the entire DOM tree of a selected object. more>>
jstree is a JavaScript that allows you to see the entire DOM tree of a selected object.
The object can be selected by ID or as an object variable.
JavaScript is an object-based scripting programming language based on the concept of prototypes. The language is best known for its use in websites, but is also used to enable scripting access to objects embedded in other applications.
Despite the name, JavaScript is only distantly related to the Java programming language, the main similarity being their common debt to the C programming language.
JavaScript has far more in common with the Self programming language.
JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape.
<<lessThe object can be selected by ID or as an object variable.
JavaScript is an object-based scripting programming language based on the concept of prototypes. The language is best known for its use in websites, but is also used to enable scripting access to objects embedded in other applications.
Despite the name, JavaScript is only distantly related to the Java programming language, the main similarity being their common debt to the C programming language.
JavaScript has far more in common with the Self programming language.
JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape.
Download (0.015MB)
Added: 2006-02-14 License: Other/Proprietary License with Source Price:
1349 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
SVG::DOM 2.33
SVG::DOM is a Perl library of DOM (Document Object Model) methods for SVG objects. more>>
SVG::DOM is a Perl library with DOM (Document Object Model) methods for SVG objects.
SVG::DOM provides a selection of methods for accessing and manipulating SVG elements through DOM-like methods such as getElements, getChildren, getNextSibling and so on.
Currently only methods that provide read operations are supported. Methods to manipulate SVG elements will be added in a future release.
SYNOPSIS
my $svg=new SVG(id=>"svg_dom_synopsis", width=>"100", height=>"100");
my %attributes=$svg->getAttributes;
my $group=$svg->group(id=>"group_1");
my $name=$group->getElementName;
my $id=$group->getElementID;
$group->circle(id=>"circle_1", cx=>20, cy=>20, r=>5, fill=>"red");
my $rect=$group->rect(id=>"rect_1", x=>10, y=>10, width=>20, height=>30);
my $width=$rect->getAttribute("width");
my $has_children=$group->hasChildren();
my @children=$group->getChildren();
my $kid=$group->getFirstChild();
do {
print $kid->xmlify();
} while ($kid=$kid->getNextSibling);
my @ancestors=$rect->getParents();
my $is_ancestor=$group->isAncestor($rect);
my $is_descendant=$rect->isDescendant($svg);
my @rectangles=$svg->getElements("rect");
my $allelements_arrayref=$svg->getElements();
...and so on...
<<lessSVG::DOM provides a selection of methods for accessing and manipulating SVG elements through DOM-like methods such as getElements, getChildren, getNextSibling and so on.
Currently only methods that provide read operations are supported. Methods to manipulate SVG elements will be added in a future release.
SYNOPSIS
my $svg=new SVG(id=>"svg_dom_synopsis", width=>"100", height=>"100");
my %attributes=$svg->getAttributes;
my $group=$svg->group(id=>"group_1");
my $name=$group->getElementName;
my $id=$group->getElementID;
$group->circle(id=>"circle_1", cx=>20, cy=>20, r=>5, fill=>"red");
my $rect=$group->rect(id=>"rect_1", x=>10, y=>10, width=>20, height=>30);
my $width=$rect->getAttribute("width");
my $has_children=$group->hasChildren();
my @children=$group->getChildren();
my $kid=$group->getFirstChild();
do {
print $kid->xmlify();
} while ($kid=$kid->getNextSibling);
my @ancestors=$rect->getParents();
my $is_ancestor=$group->isAncestor($rect);
my $is_descendant=$rect->isDescendant($svg);
my @rectangles=$svg->getElements("rect");
my $allelements_arrayref=$svg->getElements();
...and so on...
Download (0.050MB)
Added: 2007-04-23 License: Perl Artistic License Price:
915 downloads
XML::Handler::Trees 0.02
XML::Handler::Trees is a PerlSAX handlers for building tree structures. more>>
XML::Handler::Trees is a PerlSAX handlers for building tree structures.
SYNOPSIS
use XML::Handler::Trees;
use XML::Parser::PerlSAX;
my $p=XML::Parser::PerlSAX->new();
my $h=XML::Handler::Tree->new();
my $tree=$p->parse(Handler=>$h,Source=>{SystemId=>file.xml});
my $p=XML::Parser::PerlSAX->new();
my $h=XML::Handler::EasyTree->new(Noempty=>1);
my $easytree=$p->parse(Handler=>$h,Source=>{SystemId=>file.xml});
my $p=XML::Parser::PerlSAX->new();
my $h=XML::Handler::TreeBuilder->new();
$h->store_pis(1);
my $tree=$p->parse(Handler=>$h,Source=>{SystemId=>file.xml});
XML::Handler::Trees provides three PerlSAX handler classes for building tree structures. XML::Handler::Tree builds the same type of tree as the "Tree" style in XML::Parser.
XML::Handler::EasyTree builds the same type of tree as the "EasyTree" style added to XML::Parser by XML::Parser::EasyTree. XML::Handler::TreeBuilder builds the same type of tree as Sean M. Burkes XML::TreeBuilder. These classes make it possible to construct these tree structures from sources other than XML::Parser.
All three handlers can be driven by either PerlSAX 1 or PerlSAX 2 drivers. In all cases, the end_document() method returns a reference to the constructed tree, which normally becomes the return value of the PerlSAX driver.
<<lessSYNOPSIS
use XML::Handler::Trees;
use XML::Parser::PerlSAX;
my $p=XML::Parser::PerlSAX->new();
my $h=XML::Handler::Tree->new();
my $tree=$p->parse(Handler=>$h,Source=>{SystemId=>file.xml});
my $p=XML::Parser::PerlSAX->new();
my $h=XML::Handler::EasyTree->new(Noempty=>1);
my $easytree=$p->parse(Handler=>$h,Source=>{SystemId=>file.xml});
my $p=XML::Parser::PerlSAX->new();
my $h=XML::Handler::TreeBuilder->new();
$h->store_pis(1);
my $tree=$p->parse(Handler=>$h,Source=>{SystemId=>file.xml});
XML::Handler::Trees provides three PerlSAX handler classes for building tree structures. XML::Handler::Tree builds the same type of tree as the "Tree" style in XML::Parser.
XML::Handler::EasyTree builds the same type of tree as the "EasyTree" style added to XML::Parser by XML::Parser::EasyTree. XML::Handler::TreeBuilder builds the same type of tree as Sean M. Burkes XML::TreeBuilder. These classes make it possible to construct these tree structures from sources other than XML::Parser.
All three handlers can be driven by either PerlSAX 1 or PerlSAX 2 drivers. In all cases, the end_document() method returns a reference to the constructed tree, which normally becomes the return value of the PerlSAX driver.
Download (0.007MB)
Added: 2006-09-01 License: Perl Artistic License Price:
1148 downloads
glastree 1.04
glastree builds live backup trees. more>>
glastree application builds live backup trees, with branches for each day. Users directly browse the past to recover older documents or retrieve lost files. Hard links serve to compress out unchanged files, while modified ones are copied verbatim. A prune utility effects a constant, sliding window.
<<less Download (0.006MB)
Added: 2007-06-11 License: Public Domain Price:
865 downloads
OverDOM 0.1.5
OverDOM is a Java implementation of the W3C DOM, layered over a Web browsers native implementation. more>>
OverDOM is a Java implementation of the W3C DOM, layered over a Web browsers native implementation.
OverDOM provides applets with access to the browsers loaded document, through a familiar Java binding. It aims to support:
- DOM level 3
- XML and HTML
- XML namespaces
- events
- traversal & range
Usage:
import netscape.javascript.JSObject;
import org.w3c.dom.*;
import org.w3c.dom.events.*;
import org.w3c.dom.ranges.*;
import org.w3c.dom.traversal.*;
import textbender.g.hold.SpoolT;
import textbender.o.browser.overdom.*;
- - -
SpoolT spool = new SpoolT();
OverDOM overDOM = new OverDOM( spool );
WindowO window = JSObjectOverlay.getWindow( overDOM, applet );
// DOM level 3
Document document = window.getDocument();
// events
EventTarget eventRegistry = (EventTarget)document;
// traversal
TreeWalker walker = ((DocumentTraversal)document).createTreeWalker( - - - );
// range
Range range = ((DocumentRange)document).createRange();
- - -
spool.unwind(); // release overDOM (when applet destroyed, or earlier)
<<lessOverDOM provides applets with access to the browsers loaded document, through a familiar Java binding. It aims to support:
- DOM level 3
- XML and HTML
- XML namespaces
- events
- traversal & range
Usage:
import netscape.javascript.JSObject;
import org.w3c.dom.*;
import org.w3c.dom.events.*;
import org.w3c.dom.ranges.*;
import org.w3c.dom.traversal.*;
import textbender.g.hold.SpoolT;
import textbender.o.browser.overdom.*;
- - -
SpoolT spool = new SpoolT();
OverDOM overDOM = new OverDOM( spool );
WindowO window = JSObjectOverlay.getWindow( overDOM, applet );
// DOM level 3
Document document = window.getDocument();
// events
EventTarget eventRegistry = (EventTarget)document;
// traversal
TreeWalker walker = ((DocumentTraversal)document).createTreeWalker( - - - );
// range
Range range = ((DocumentRange)document).createRange();
- - -
spool.unwind(); // release overDOM (when applet destroyed, or earlier)
Download (MB)
Added: 2007-01-07 License: MIT/X Consortium License Price:
1021 downloads
XML::DOM::EntityReference 1.44
XML::DOM::EntityReference is an XML ENTITY reference in XML::DOM. more>>
XML::DOM::EntityReference is an XML ENTITY reference in XML::DOM.
XML::DOM::EntityReference extends XML::DOM::Node.
EntityReference objects may be inserted into the structure model when an entity reference is in the source document, or when the user wishes to insert an entity reference. Note that character references and references to predefined entities are considered to be expanded by the HTML or XML processor so that characters are represented by their Unicode equivalent rather than by an entity reference.
Moreover, the XML processor may completely expand references to entities while building the structure model, instead of providing EntityReference objects. If it does provide such objects, then for a given EntityReference node, it may be that there is no Entity node representing the referenced entity; but if such an Entity exists, then the child list of the EntityReference node is the same as that of the Entity node. As with the Entity node, all descendants of the EntityReference are readonly.
The resolution of the children of the EntityReference (the replacement value of the referenced Entity) may be lazily evaluated; actions by the user (such as calling the childNodes method on the EntityReference node) are assumed to trigger the evaluation.
<<lessXML::DOM::EntityReference extends XML::DOM::Node.
EntityReference objects may be inserted into the structure model when an entity reference is in the source document, or when the user wishes to insert an entity reference. Note that character references and references to predefined entities are considered to be expanded by the HTML or XML processor so that characters are represented by their Unicode equivalent rather than by an entity reference.
Moreover, the XML processor may completely expand references to entities while building the structure model, instead of providing EntityReference objects. If it does provide such objects, then for a given EntityReference node, it may be that there is no Entity node representing the referenced entity; but if such an Entity exists, then the child list of the EntityReference node is the same as that of the Entity node. As with the Entity node, all descendants of the EntityReference are readonly.
The resolution of the children of the EntityReference (the replacement value of the referenced Entity) may be lazily evaluated; actions by the user (such as calling the childNodes method on the EntityReference node) are assumed to trigger the evaluation.
Download (0.039MB)
Added: 2006-10-13 License: Perl Artistic License Price:
1106 downloads
XML::DOM::Text 1.44
XML::DOM::Text is a piece of XML text in XML::DOM. more>>
XML::DOM::Text is a piece of XML text in XML::DOM.
XML::DOM::Text extends XML::DOM::CharacterData, which extends XML::DOM::Node.
The Text interface represents the textual content (termed character data in XML) of an Element or Attr. If there is no markup inside an elements content, the text is contained in a single object implementing the Text interface that is the only child of the element. If there is markup, it is parsed into a list of elements and Text nodes that form the list of children of the element.
When a document is first made available via the DOM, there is only one Text node for each block of text. Users may create adjacent Text nodes that represent the contents of a given element without any intervening markup, but should be aware that there is no way to represent the separations between these nodes in XML or HTML, so they will not (in general) persist between DOM editing sessions. The normalize() method on Element merges any such adjacent Text objects into a single node for each block of text; this is recommended before employing operations that depend on a particular document structure, such as navigation with XPointers.
METHODS
splitText (offset)
Breaks this Text node into two Text nodes at the specified offset, keeping both in the tree as siblings. This node then only contains all the content up to the offset point. And a new Text node, which is inserted as the next sibling of this node, contains all the content at and after the offset point.
Parameters: offset The offset at which to split, starting from 0.
Return Value: The new Text node.
DOMExceptions:
INDEX_SIZE_ERR
Raised if the specified offset is negative or greater than the number of characters in data.
NO_MODIFICATION_ALLOWED_ERR
Raised if this node is readonly.
<<lessXML::DOM::Text extends XML::DOM::CharacterData, which extends XML::DOM::Node.
The Text interface represents the textual content (termed character data in XML) of an Element or Attr. If there is no markup inside an elements content, the text is contained in a single object implementing the Text interface that is the only child of the element. If there is markup, it is parsed into a list of elements and Text nodes that form the list of children of the element.
When a document is first made available via the DOM, there is only one Text node for each block of text. Users may create adjacent Text nodes that represent the contents of a given element without any intervening markup, but should be aware that there is no way to represent the separations between these nodes in XML or HTML, so they will not (in general) persist between DOM editing sessions. The normalize() method on Element merges any such adjacent Text objects into a single node for each block of text; this is recommended before employing operations that depend on a particular document structure, such as navigation with XPointers.
METHODS
splitText (offset)
Breaks this Text node into two Text nodes at the specified offset, keeping both in the tree as siblings. This node then only contains all the content up to the offset point. And a new Text node, which is inserted as the next sibling of this node, contains all the content at and after the offset point.
Parameters: offset The offset at which to split, starting from 0.
Return Value: The new Text node.
DOMExceptions:
INDEX_SIZE_ERR
Raised if the specified offset is negative or greater than the number of characters in data.
NO_MODIFICATION_ALLOWED_ERR
Raised if this node is readonly.
Download (0.11MB)
Added: 2006-07-20 License: GPL (GNU General Public License) Price:
1191 downloads
XML::DOM::Attr 1.44
XML::DOM::Attr is an XML attribute in XML::DOM. more>>
XML::DOM::Attr is an XML attribute in XML::DOM.
XML::DOM::Attr extends XML::DOM::Node.
The Attr nodes built by the XML::DOM::Parser always have one child node which is a Text node containing the expanded string value (i.e. EntityReferences are always expanded.) EntityReferences may be added when modifying or creating a new Document.
The Attr interface represents an attribute in an Element object. Typically the allowable values for the attribute are defined in a document type definition.
Attr objects inherit the Node interface, but since they are not actually child nodes of the element they describe, the DOM does not consider them part of the document tree. Thus, the Node attributes parentNode, previousSibling, and nextSibling have a undef value for Attr objects. The DOM takes the view that attributes are properties of elements rather than having a separate identity from the elements they are associated with; this should make it more efficient to implement such features as default attributes associated with all elements of a given type.
Furthermore, Attr nodes may not be immediate children of a DocumentFragment. However, they can be associated with Element nodes contained within a DocumentFragment. In short, users and implementors of the DOM need to be aware that Attr nodes have some things in common with other objects inheriting the Node interface, but they also are quite distinct.
The attributes effective value is determined as follows: if this attribute has been explicitly assigned any value, that value is the attributes effective value; otherwise, if there is a declaration for this attribute, and that declaration includes a default value, then that default value is the attributes effective value; otherwise, the attribute does not exist on this element in the structure model until it has been explicitly added. Note that the nodeValue attribute on the Attr instance can also be used to retrieve the string version of the attributes value(s).
In XML, where the value of an attribute can contain entity references, the child nodes of the Attr node provide a representation in which entity references are not expanded. These child nodes may be either Text or EntityReference nodes. Because the attribute type may be unknown, there are no tokenized attribute values.
<<lessXML::DOM::Attr extends XML::DOM::Node.
The Attr nodes built by the XML::DOM::Parser always have one child node which is a Text node containing the expanded string value (i.e. EntityReferences are always expanded.) EntityReferences may be added when modifying or creating a new Document.
The Attr interface represents an attribute in an Element object. Typically the allowable values for the attribute are defined in a document type definition.
Attr objects inherit the Node interface, but since they are not actually child nodes of the element they describe, the DOM does not consider them part of the document tree. Thus, the Node attributes parentNode, previousSibling, and nextSibling have a undef value for Attr objects. The DOM takes the view that attributes are properties of elements rather than having a separate identity from the elements they are associated with; this should make it more efficient to implement such features as default attributes associated with all elements of a given type.
Furthermore, Attr nodes may not be immediate children of a DocumentFragment. However, they can be associated with Element nodes contained within a DocumentFragment. In short, users and implementors of the DOM need to be aware that Attr nodes have some things in common with other objects inheriting the Node interface, but they also are quite distinct.
The attributes effective value is determined as follows: if this attribute has been explicitly assigned any value, that value is the attributes effective value; otherwise, if there is a declaration for this attribute, and that declaration includes a default value, then that default value is the attributes effective value; otherwise, the attribute does not exist on this element in the structure model until it has been explicitly added. Note that the nodeValue attribute on the Attr instance can also be used to retrieve the string version of the attributes value(s).
In XML, where the value of an attribute can contain entity references, the child nodes of the Attr node provide a representation in which entity references are not expanded. These child nodes may be either Text or EntityReference nodes. Because the attribute type may be unknown, there are no tokenized attribute values.
Download (0.11MB)
Added: 2006-07-20 License: GPL (GNU General Public License) Price:
1191 downloads
XML::DOM::Lite::XSLT 0.15
XML::DOM::Lite::XSLT is Perl module XSLT engine for XML::DOM::Lite. more>>
[COPYRIGHT]
SYNOPSIS
use XML::DOM::Lite qw(Parser XSLT);
$parser = Parser->new( whitespace => strip );
$xsldoc = $parser->parse($xsl);
$xmldoc = $parser->parse($xml);
$output = XSLT->process($xmldoc, $xsldoc);
<<lessSYNOPSIS
use XML::DOM::Lite qw(Parser XSLT);
$parser = Parser->new( whitespace => strip );
$xsldoc = $parser->parse($xsl);
$xmldoc = $parser->parse($xml);
$output = XSLT->process($xmldoc, $xsldoc);
Download (0.031MB)
Added: 2006-11-30 License: Perl Artistic License Price:
1059 downloads
XML::DOM::Lite 0.10
XML::DOM::Lite is a Lite Pure Perl XML DOM Parser Kit. more>>
XML::DOM::Lite is a Lite Pure Perl XML DOM Parser Kit.
SYNOPSIS
# Parser
use XML::DOM::Lite qw(Parser :constants);
$parser = Parser->new( %options );
$doc = Parser->parse($xmlstr);
$doc = Parser->parseFile(/path/to/file.xml);
# strip whitespace (can be about 30% faster)
$doc = Parser->parse($xml, whitespace => strip);
# All Nodes
$copy = $node->cloneNode($deep);
$nodeType = $node->nodeType;
$parent = $node->parentNode;
$name = $node->nodeName;
$xmlstr = $node->xml;
$owner = $node->ownerDocument;
# Element Nodes
$first = $node->firstChild;
$last = $node->lastChild;
$tag = $node->tagName;
$prev = $node->nextSibling;
$next = $node->previousSibling;
$node->setAttribute("foo", $bar);
$foo = $node->getAttribute("foo");
foreach my $attr (@{$node->attributes}) { # attributes as nodelist
# ... do stuff
}
$node->attributes->{foo} = "bar"; # or as hashref (overload)
$liveNodeList = $node->getElementsByTagName("child"); # deep
$node->insertBefore($newchild, $refchild);
$node->replaceChild($newchild, $refchild);
# Text Nodes
$nodeValue = $node->nodeValue;
$node->nodeValue("new text value");
# Processing Instruction Nodes
# CDATA Nodes
# Comments
$data = $node->nodeValue;
# NodeList
$item = $nodeList->item(42);
$index = $nodeList->nodeIndex($node);
$nlist->insertNode($newNode, $index);
$removed = $nlist->removeNode($node);
$length = $nlist->length; # OR scalar(@$nodeList)
# NodeIterator and NodeFilter
use XML::DOM::Lite qw(NodeIterator :constants);
$niter = NodeIterator->new($rootnode, SHOW_ELEMENT, {
acceptNode => sub {
my $n = shift;
if ($n->tagName eq wantme) {
return FILTER_ACCEPT;
} elsif ($n->tagName eq skipme) {
return FILTER_SKIP;
} else {
return FILTER_REJECT;
}
}
);
while (my $n = $niter->nextNode) {
# do stuff
}
# XSLT
use XML::DOM::Lite qw(Parser XSLT);
$parser = Parser->new( whitespace => strip );
$xsldoc = $parser->parse($xsl);
$xmldoc = $parser->parse($xml);
$output = XSLT->process($xmldoc, $xsldoc);
# XPath
use XML::DOM::Lite qw(XPath);
$result = XPath->evaluate(/path/to/*[@attr="value"], $contextNode);
# Document
$rootnode = $doc->documentElement;
$nodeWithId = $doc->getElementById("my_node_id");
$textnode = $doc->createTextNode("some text string");
$element = $doc->createElement("myTagName");
$docfrag = $doc->createDocumentFragment();
$xmlstr = $doc->xml;
$nlist = $doc->selectNodes(/xpath/expression);
$node = $doc->selectSingleNode(/xpath/expression);
# Serializer
use XML::DOM::Lite qw(Serializer);
$serializer = Serializer->new;
$xmlout = $serializer->serializeToString($node);
<<lessSYNOPSIS
# Parser
use XML::DOM::Lite qw(Parser :constants);
$parser = Parser->new( %options );
$doc = Parser->parse($xmlstr);
$doc = Parser->parseFile(/path/to/file.xml);
# strip whitespace (can be about 30% faster)
$doc = Parser->parse($xml, whitespace => strip);
# All Nodes
$copy = $node->cloneNode($deep);
$nodeType = $node->nodeType;
$parent = $node->parentNode;
$name = $node->nodeName;
$xmlstr = $node->xml;
$owner = $node->ownerDocument;
# Element Nodes
$first = $node->firstChild;
$last = $node->lastChild;
$tag = $node->tagName;
$prev = $node->nextSibling;
$next = $node->previousSibling;
$node->setAttribute("foo", $bar);
$foo = $node->getAttribute("foo");
foreach my $attr (@{$node->attributes}) { # attributes as nodelist
# ... do stuff
}
$node->attributes->{foo} = "bar"; # or as hashref (overload)
$liveNodeList = $node->getElementsByTagName("child"); # deep
$node->insertBefore($newchild, $refchild);
$node->replaceChild($newchild, $refchild);
# Text Nodes
$nodeValue = $node->nodeValue;
$node->nodeValue("new text value");
# Processing Instruction Nodes
# CDATA Nodes
# Comments
$data = $node->nodeValue;
# NodeList
$item = $nodeList->item(42);
$index = $nodeList->nodeIndex($node);
$nlist->insertNode($newNode, $index);
$removed = $nlist->removeNode($node);
$length = $nlist->length; # OR scalar(@$nodeList)
# NodeIterator and NodeFilter
use XML::DOM::Lite qw(NodeIterator :constants);
$niter = NodeIterator->new($rootnode, SHOW_ELEMENT, {
acceptNode => sub {
my $n = shift;
if ($n->tagName eq wantme) {
return FILTER_ACCEPT;
} elsif ($n->tagName eq skipme) {
return FILTER_SKIP;
} else {
return FILTER_REJECT;
}
}
);
while (my $n = $niter->nextNode) {
# do stuff
}
# XSLT
use XML::DOM::Lite qw(Parser XSLT);
$parser = Parser->new( whitespace => strip );
$xsldoc = $parser->parse($xsl);
$xmldoc = $parser->parse($xml);
$output = XSLT->process($xmldoc, $xsldoc);
# XPath
use XML::DOM::Lite qw(XPath);
$result = XPath->evaluate(/path/to/*[@attr="value"], $contextNode);
# Document
$rootnode = $doc->documentElement;
$nodeWithId = $doc->getElementById("my_node_id");
$textnode = $doc->createTextNode("some text string");
$element = $doc->createElement("myTagName");
$docfrag = $doc->createDocumentFragment();
$xmlstr = $doc->xml;
$nlist = $doc->selectNodes(/xpath/expression);
$node = $doc->selectSingleNode(/xpath/expression);
# Serializer
use XML::DOM::Lite qw(Serializer);
$serializer = Serializer->new;
$xmlout = $serializer->serializeToString($node);
Download (0.030MB)
Added: 2006-07-14 License: Perl Artistic License Price:
1199 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 dom trees 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