Main > Programming > Libraries >

XML::EasySQL::XMLobj::Node 1.2

XML::EasySQL::XMLobj::Node 1.2

Sponsored Links

XML::EasySQL::XMLobj::Node 1.2 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.011 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 839
Date added: 2007-07-07
Publisher: Curtis Lee Fulton

XML::EasySQL::XMLobj::Node 1.2 description

XML::EasySQL::XMLobj::Node is a Perl module that contains a Node interface. Derived from a fork of Robert Hansons killer XML::EasyOBJ module, which offers Easy XML object navigation.

METHODS

makeNewNode( NEW_TAG )

Append a new element node to the current node. Takes the tag name as the parameter and returns the created node as a convienence.

my $p_element = $doc->body->makeNewNode(p);

getString( )

Recursively extracts text from the current node and all children element nodes. Returns the extracted text as a single scalar value.

_extractText( )

Utility method. Dont call this and dont overload it.

setString( STRING )

Sets the text value of the specified element. This is done by first removing all text node children of the current element and then appending the supplied text as a new child element.

Take this XML fragment and code for example:

< p >This elment has < b >text< /b > and < i >child< /i > elements< /p >

$doc->p->setString(This is the new text);

This will change the fragment to this:

< p >< b >text< /b >< i >child< /i >This is the new text< /p >

Because the and tags are not text nodes they are left unchanged, and the new text is added at the end of the specified element.

If you need more specific control on the change you should either use the getDomObj() method and use the DOM methods directly or remove all of the child nodes and rebuild the

element from scratch. Also see the addString() method.

addString( STRING )

Adds to the the text value of the specified element. This is done by appending the supplied text as a new child element.

Take this XML fragment and code for example:

< p >This elment has < b >text< /b >< /p >

$doc->p->addString( and elements);

This will change the fragment to this:

< p >This elment has < b >text< /b > and elements< /p >

getAttr( ATTR_NAME )

Returns the value of the named attribute.

my $val = $doc->body->img->getAttr(src);
getTagName( )

Returns the tag name of the specified element. This method is useful when you are enumerating child elements and do not know their element names.

foreach my $element ( $doc->getElement() ) {
print $element->getTagName();
}
setAttr( ATTR_NAME, ATTR_VALUE, [ATTR_NAME, ATTR_VALUE]... )

For each name/value pair passed the attribute name and value will be set for the specified element.

remAttr( ATTR_NAME )

Removes the specified attribute from the current element.

remElement( TAG_NAME, INDEX )

Removes a child element of the current element. The name of the child element and the index must be supplied. An index of 0 will remove the first occurance of the named element, 1 the second, 2 the third, etc.

getElement( TAG_NAME, INDEX )

Returns the node from the tag name and index. If no index is given the first child with that name is returned. Use this method when you have element names that include characters that are not legal as a perl method name. For example:

< foo > < !-- root element -- >
< bar >
< foo-bar >test< /foo-bar >
< /bar >
< /foo >

# "foo-bar" is not a legal method name
print $doc->bar->getElement(foo-bar)->getString();
getDomObj( )

Returns the DOM object associated with the current node. This is useful when you need fine access via the DOM to perform a specific function.

XML::EasySQL::XMLobj::Node 1.2 Screenshot

Advertisements

XML::EasySQL::XMLobj::Node 1.2 Keywords

Bookmark XML::EasySQL::XMLobj::Node 1.2

Hyperlink code:
Link for forum:

XML::EasySQL::XMLobj::Node 1.2 Copyright

WareSeeker periodically updates pricing and software information of XML::EasySQL::XMLobj::Node 1.2 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of XML::EasySQL::XMLobj::Node 1.2 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
XML::EasySQL::XMLobj is a Fork of Robert Hansons killer XML::EasyOBJ module, which offers Easy XML object navigation. Free Download
XML::EasySQL is a two-way SQL/XML base class for Perl. Free Download
XML::LibXML::Node is an abstract base class of XML::LibXML nodes. Free Download
XML::Mini::Node contains nodes that are used as atomic containers for numerical and text data and act as leaves in the XML tree. Free Download
XML::SimpleObject is a Perl extension allowing a simple object representation of a parsed XML::Parser tree. Free Download
EasySQL is a meta-SQL-language for MySQL. Free Download
Plucene is a Perl port of the Lucene search engine. Free Download
XML::XMLWriter is a Perl module for creating a XML document object oriented with on the fly validating towards the given DTD. Free Download