Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 31.336.996 Times

XML::Compile::Schema::XmlReader 0.18

  Date Added: February 25, 2010  |  Visits: 693


Report Broken Link
Printer Friendly Version

Product Homepage
Download (78 downloads)

XML::Compile::Schema::XmlReader Perl module contains bricks to translate XML to HASH. SYNOPSIS my $schema = XML::Compile::Schema- >new(...); my $code = $schema- >compile(READER = > ...); The translator understands schemas, but does not encode that into actions. This module implements those actions to translate from XML into a (nested) Perl HASH structure. DETAILS Processing Wildcards If you want to collect information from the XML structure, which is permitted by any and anyAttribute specifications in the schema, you have to implement that yourself. The problem is XML::Compile has less knowledge than you about the possible data. anyAttribute By default, the anyAttribute specification is ignored. When TAKE_ALL is given, all attributes which are fulfilling the name-space requirement added to the returned data-structure. As key, the absolute element name will be used, with as value the related unparsed XML element. In the current implementation, if an explicit attribute is also covered by the name-spaces permitted by the anyAttribute definition, then it will also appear in that list (and hence the handler will be called as well). Use XML::Compile::Schema::compile(anyAttribute) to write your own handler, to influence the behavior. The handler will be called for each attribute, and you must return list of pairs of derived information. When the returned is empty, the attribute data is lost. The value may be a complex structure. Example: anyAttribute in XmlReader Say your schema looks like this: < schema targetNamespace="http://mine" xmlns:me="http://mine" ... > < element name="el" > < complexType > < attribute name="a" type="xs:int" / > < anyAttribute namespace="##targetNamespace" processContents="lax" > < / complexType > < / element > < simpleType name="non-empty" > < restriction base="xs:NCName" / > < / simpleType > < / schema > Then, in an application, you write: my $r = $schema- >compile(READER = > {http://mine}el , anyAttribute = > ALL ); my $h = $r- >( < < __XML ); < el xmlns:me="http://mine" > < a >42< /a > < b type="me:non-empty" > everything < / b > < / el > __XML use Data::Dumper Dumper; print Dumper $h; __XML__ The output is something like $VAR1 = { a = > 42 , {http://mine}a = > ... # XML::LibXML::Node with < a >42< /a > , {http://mine}b = > ... # XML::LibXML::Node with < b >everything< /b > }; You can improve the reader with a callback. When you know that the extra attribute is always of type non-empty, then you can do my $read = $schema- >compile ( READER = > {http://mine}el , anyAttribute = > &filter ); my $anyAttRead = $schema- >compile ( READER = > {http://mine}non-empty ); sub filter($$$$) { my ($fqn, $xml, $path, $translator) = @_; return () if $fqn ne {http://mine}b; (b = > $anyAttRead- >($xml)); } my $h = $r- >( see above ); print Dumper $h; Which will result in $VAR1 = { a = > 42 , b = > everything }; The filter will be called twice, but return nothing in the first case. You can implement any kind of complex processing in the filter..

Requirements: No special requirements
Platforms: Linux
Keyword: Hash Libraries Module Perl Perl Module Reader Schema Translate Translate Xml Will Be Xmlcompileschemaxmlreader Xmlreader Xmlreader Perl
Users rating: 0/10

License: Freeware Size: 122.88 KB
Video Chat Tools  -  Dolphin Chat Module 2.0
It can add a live chat room to Dolphin CMS, feature rich, multiple skins, fully customizable, easy to install, users single sign-on. The best part is that once the module is successfully installed, a free hosted chat room will be assigned to your...
22.14 KB  
Windows Software  -  Elgg Chat Module 1.0
It can add a live chat room to Elgg, feature rich, multiple skins, fully customizable, easy to install, profile integrated, users single sign-on. The best part is that once the module is successfully installed, a free hosted chat room will be...
20.55 KB  
Chat  -  Joomla Chat Module 3.2
It can add a live chat room to Joomla CMS, feature rich, multiple skins, fully customizable, easy to install, users single sign-on. The best part is that once the module is successfully installed, a free hosted chat room will be assigned to your...
27.12 KB  
Communication Tools  -  Joomla Chat Extension 3.2
It can add a live chat room to Joomla CMS, feature rich, multiple skins, fully customizable, easy to install, users single sign-on. The best part is that once the module is successfully installed, a free hosted chat room will be assigned to your...
27.12 KB  
Modules  -  Webform Payments 5.x-1.x-de
This module allows you to select webform components whose values will be passed to a simple PayPal shopping cart when the form is submitted.This module is still in active development. Although it's considered stable, features may be changed before...
10 KB  
Modules  -  Simplenews RealName 6.x-1.0
The Simplenews RealName module allows you to send personalized newsletters with the Simplenews module by collecting the name of the subscribers, which will be available in the messages as token.Features overview * Collects the subscriber's name...
10 KB  
Libraries  -  OpenGeoDB Perl module 0.4
OpenGeDB Perl module is a module to access the OpenGeoDB database and calculate all ZIP codes in a certain radius..
3.07 KB  
Libraries  -  Perl::Critic::Config 1.061
Perl::Critic::Config is a Perl module to find and load Perl::Critic user-preferences. Perl::Critic::Config takes care of finding and processing user-preferences for Perl::Critic. The Config object defines which Policy modules will be loaded into...
245.76 KB  
Libraries  -  Spreadsheet::WriteExcelXML 0.10
Spreadsheet::WriteExcelXML is a Perl module that can create an Excel file in XML format. SYNOPSIS To write a string, a formatted string, a number and a formula to the first worksheet in an Excel XML spreadsheet called perl.xls: use...
143.36 KB  
Libraries  -  Gtk2::GladeXML 1.005
Gtk2::GladeXML is a Perl module that create user interfaces directly from Glade XML files. SYNOPSIS # for a pure gtk+ glade project use Gtk2 -init; use Gtk2::GladeXML; $gladexml = Gtk2::GladeXML->new(;...
34.82 KB  
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  wolfSSL 3.13.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB