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.569.383 Times

XML::XPathToXML 2.1.0

  Date Added: June 22, 2010  |  Visits: 612


Report Broken Link
Printer Friendly Version

Product Homepage
Download (73 downloads)

XML::XPathToXML is a Perl module that generates XML document from XPath expressions. SYNOPSIS my @data = ( /project/name => The Ultimate Question, /project/comment() => generated by XPathToXML , /project/start => 2002-09-08, /project/end => 7002002-09-08, /project/@id => 42, /project/temp/pre => 41, /project/temp/pre[position()=6] => 46, /project/temp/pre[3] => 43, /project/temp/pre[2] => XML::LibXML->new->parse_xml_chunk(q(arbitrary < b>XML< /b> chunk)), ); my $xpx = new XML::XPathToXML( debug=>1 ); $xpx->parse( @data ); $xpx->parse( /project/temp/pre[last()]/@guess, tooHigh ); print $xpx->documentElement->toString(1)."n"; Result: < project id="42"> < !-- generated by XPathToXML --> < name>The Ultimate Question< /name> < start>2002-09-08< /start> < end>7002002-09-08< /end> < temp> < pre>41< /pre> < pre>arbitrary < b>XML< /b> chunk< /pre> < pre>43< /pre> < pre/> < pre/> < pre guess="tooHigh">46< /pre> < /temp> < /project> Generates an XML document or node tree from one or more XPath expressions. Returnes an XML::LibXML::Document or XML::LibXML::Element. Only a limited subset of XPath is currently supported. Namely, the XPath expression must be a location path consisting of a /-separated sequence of one or more location steps along the child, sibling, or attribute axes. The node-test part of the expression cannot be neither a wildcard (*, @*, prefix:*, ...), nor the node() function. If a namespace prefix is used, then either the namespace must already be declared in the document or registered with an XPathContext object. Location steps may contain arbitrary predicates (filters), but see the details below. The parser processes the location path as follows: For an absolute location path (starting with /) the evaluation starts on the document node. For relative location path the evaluation starts on a specified initial context node. The parser evaluates the location path from left to right, one location step at a time, starting either on the document node (in case of absolute location path) or on a specified initial context node (in case of relative location paths). If the location step (including filters) matches a child node or an attribute of the current node, then the parser moves to the first node matched and to the next location step. If no nodes are matched by the location step, then the parser creates an element or attribute with the name (and possibly namespace) specified in the node-test part of the location step and tries again. If still no nodes are matched, the parser repeats the procedure until the location step matches or the number of sibling nodes created in this way reaches the limit specified in maximumAutoSiblings. In the first case the parser moves to the first matching node. In the latter case the parser fails (removing all sibling-nodes created for the failed location-step from the tree). Hence, if a filter predicate of a location step specifies a position of a node (e.g. with [4], or [position3], etc), then the parser tries to automatically create empty siblings nodes until it finally creates one with for which the predicate is true. Note, that because the parser only processes one location step at a time and always picks the first matching node, expressions like /root/a/b are treated as /root/a[1]/b[1]. So, in case of the document < root> < a/> < a> < b/> < /a> < /root> $xpx->parse(q(/root/a/b),foo) will result in < root> < a>< b>foo< /b>< /a> < a> < b/> < /a> < /root> although an element matching /root/a/b was already present in the document. To prevent this, either explicitly state that b must exist with /root/a[b]/b or set the second element a as the context node and use a relative location path such as b: $xpx->setContextNode($xpc->document->find(/root/a[2])->get_node(1)) $xpx->parse("b","foo"); # "./b" is also ok or simply $xpx->createNode("b","foo",$xpc->document->find(/root/a[2])->get_node(1)); In the tradition of XML::LibXML errors must be trapped with eval() (the parser dies on error)..

Requirements: No special requirements
Platforms: Linux
Keyword: Document In Case Of Libraries Libxml Location Location Path Node Parser Path Perl Module Xml Document Xmlxpathtoxml Xpathtoxml
Users rating: 0/10

License: Freeware Size: 307.2 KB
Libraries  -  Smieciuch++ 0.6.4 RC3
Smieciuch library is a precise (in case of C++) or nearly precise (in case of plain C) tracing garbage collector. Tracing means that GC scans memory for active pointers and traces all paths (consisting of possibly multiple pointer indirections)...
Libraries  -  Bio::NEXUS::Node 0.67
Bio::NEXUS::Node is a Perl module that provides functions for manipulating nodes in trees. SYNOPSIS new Bio::NEXUS::Node; METHODS new Title : new Usage : $node = new Bio::NEXUS::Node(); Function: Creates a new Bio::NEXUS::Node object...
153.6 KB  
Medical  -  Baby 120 1.1.1
In case of emergency, Baby120 helps worried adults conveniently locate nearby pediatric emergency rooms in the greater Shanghai region. Highlights include: + Generate a list of pediatric emergency rooms that are closest to your...
9.4 MB  
Social Networking  -  Get Help
In case of emergency GetHelp is a very handy application . You can use this application to contact your saved emergency contacts using SMS (with your current location information), Call and continuous location tracking. Using Tracking feature your...
1024 KB  
Productivity  -  HelpMeFree
Help Me Free is an In Case Of Emergency App for Windows Mobile. It will make use of your device's GPS capability to track down your location and send information to your loved ones in case of emergency. Information will be sent through SMS & Email...
7 MB  
Productivity  -  HelpMeLite
Help Me Lite is a Free In Case Of Emergency App for Windows Mobile. It will make use of your device's GPS capability to track down your location and send information to your loved ones in case of emergency. Information will be sent through an SMS...
7 MB  
Health & Fitness  -  Panic Button Pro
In case of emergency, the Panic Button Pro can help you by sending to your closest ones your location along with a message you choose, combined with a powerful siren sound and an automated call to emergency number 112. Now Updated for more...
2 MB  
Productivity  -  Report Accident
Stuck in traffic because of traffic jam? Avoid your friends to take the same route, this app lets you email and share on social networks the location of the accident and gives u help tips in case of emergency like jump starting a car, first aid...
1024 KB  
Productivity  -  Resquer
Thanks for the tremendous response! OVER 5000 DOWNLOADS New features and a MOBILE WEBSITE coming soon! ------------------------------------------------------- With this app, you can allow your friends to track your location in case of...
1024 KB  
Social Networking  -  The Push Button
The Push Button is a WINDOWS PHONE 8 application designed to protect individuals by raising an alarm to their friends and family through Messages. Key Features: * Save upto five numbers to be informed in case of emergency. *...
1024 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