Linux Today: Linux News On Internet Time.
Search Linux Today
search.internet.com
Linux News Sections:  Blog -  Developer -  High Performance -  Infrastructure -  IT Management -  Security -  Storage -
Linux Today Navigation
LT Home
Preferences
Contribute
Link to Us
Search
Linux Jobs

Become a Marketplace Partner

internet.commerce
Be a Commerce Partner














The Linux Channel at internet.com
Linux Today
Enterprise Linux Today
Apache Today
JustLinux.com
Linux Planet
PHPBuilder
All Linux Devices
Technology Jobs

JustTechJobs.com

LinuxToday Newsletters
Subscribe News
Subscribe PR
Subscribe Security

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

 







Current Newswire:

Microsoft, other rivals slam Google Chrome OS

Intel Linux Graphics Shine With Fedora 12

Editor's Note: Do It Yourself "Cloud"

Google Chrome OS: First looks, first impressions

Kernel Log: Coming in 2.6.32 (Part 3) - Storage

TV Mythos Renewed: MythTV 0.22 with Many Improvements

Enhancing openSUSE 11.2: Adding Repositories and Packages

A Northwest Nobel option? (Linus for the Nobel Peace prize)

SECURITY: Cloud Computing Security Benefits, Risks and Recommendations

Keeping score in test-driven development with Python, PyLint, unittest, doctest,




Arcsight Engineer
The Computer Merchant, Ltd
US-DC-Washington

Justtechjobs.com Post A Job | Post A Resume
:IBM developerWorks: Dare to script tree-based XML with Perl
IBM developerWorks: Dare to script tree-based XML with Perl
Jul 9, 2000, 15 :47 UTC (0 Talkback[s]) (3090 reads)

(Other stories by Parand Tony Darugar)

"Parsing an XML document into tree structures makes it possible to operate on the tree structure of the data. Find out how to use the functions for accessing and manipulating the document tree, and follow a sample stock-trading application that uses Perl, DOM, XML, and a database to evaluate trading rules. (You can apply the same techniques with other scripting languages, including Tcl and Python.) This is the second installment on using scripting languages to manipulate and transform XML documents."

"My previous article discussed how to manipulate XML with scripting languages, and Perl in particular. In the course of parsing a file that way, handlers are called as each tag is encountered. That provides a very efficient means of processing XML, both in memory usage and processing time. However, certain tasks are difficult to accomplish in the event-based methodology. Imagine, for example, needing to move or rearrange certain segments of the document or sorting items within the document. Because the document is processed as a stream, we would first need to store the components before sorting or rearranging them. A mechanism that would store the components automatically would make such tasks substantially easier."

"XML documents are required to be well-balanced, making it easy to store them as trees. Once you parse XML documents into tree structures, you can then operate on the tree. This yields a great deal of flexibility in dealing with the documents: you can access the components of the document in random order, rearrange them, and add or remove them. This is especially appropriate for applications in which the flow of processing is based on external logic, as opposed to the order and occurance of elements within the XML document. Storing the document as a tree enables random access to its data and structure, instead of having the processing governed by when and where the tags and elements occur."

Complete Story

Related Stories:
InternetNews.com: XML Standards Move Forward(Jul 09, 2000)
XML.com: The State of XML(Jun 17, 2000)
SRO: Exposing XML Myths(May 27, 2000)
Linux Magazine: Getting Better References Through Perl(May 20, 2000)
LinuxMall.com: XML Medical Terminology Project Seeks To Unify Information(May 07, 2000)
PerlMonth: Debugging Perl CGI Scripts(Apr 29, 2000)
XML.org: XML Europe --- Time for Tough Decisions(Apr 22, 2000)
XML.com: XML, Standards and You(Apr 16, 2000)
AtlantaGeek.com: Have Perl will Travel(Apr 13, 2000)
XML.com: Processing XML with Perl(Apr 12, 2000)
IBM developerWorks: Tutorial: XML and scripting languages(Mar 04, 2000)



No talkbacks posted.
  Home | Search Talkbacks | Customize View    Top of Page  



Enter your comments below:

* Your Name:

* Your Email Address:

* Subject:

CC: [will also send this talkback to an E-Mail address]

* Comments:

Tags allowed:<I>,<B> and <U>. See our talkback-policy for more about talkback content.

Fields marked with * are required!






..............................




All times are recorded in UTC.
Linux is a trademark of Linus Torvalds.
Powered by Linux, Apache and PHP

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs