Sponsored Content
Top Forums Shell Programming and Scripting Perl script for extract data from xml files Post 302276776 by fpmurphy on Wednesday 14th of January 2009 02:41:38 PM
Old 01-14-2009
Sorry but what you provided is not a valid or comforming XML document (file).

Furthermore can you explain in detail what output you want for a given input. I cannot understand your example.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

extract data from xml- shell script using awk

Hi, This is the xml file that i have. - <front-servlet platform="WAS4.0" request-retriever="SiteMinder-aware" configuration-rescan-interval="60000"> <concurrency-throttle maximum-concurrency="50" redirect-page="/jsp/defaulterror.jsp" /> - <loggers> <instrumentation... (5 Replies)
Discussion started by: nishana
5 Replies

2. Shell Programming and Scripting

Help with shell script to extract data from XML file

Hello Scripting Gurus, I need help with extracting data from the XML file using shell script. The data is in a large XML and I need to extract the id values of all completedworkflows. Here is a sample of it. Input and output data is also in the attached text files. <wfregistry>... (5 Replies)
Discussion started by: yajaykumar
5 Replies

3. Shell Programming and Scripting

Extract xml data

Hi all, I have the following xml file : <xmlhead><xmlelement1>element1value</xmlelement1>\0a<xmlelement2>jjasd</xmlelement2>...</xmlhead> As you can see there are no lines or spaces seperating the elements, just the character \0a. How can i find and print the values of a specific element?... (1 Reply)
Discussion started by: nthed
1 Replies

4. Shell Programming and Scripting

XML data extract

Hi all, I have the following xml document : <HEADER><El1>asdf</El1> <El2>3</El2> <El3>asad</El3> <El4>asasdf</El4> <El5>asdf</El5> <El6>asdf</El6> <El7>asdf</El7> <El8>A</El8> <El9>0</El9> <El10>75291028141917</El10> <El11>asdf</El11> <El12>sdf</El12> <El13>er</El13> <El14><El15>asdf... (1 Reply)
Discussion started by: nthed
1 Replies

5. Shell Programming and Scripting

Perl script to extract 'ID' From XML File

File1.xml <?xml version.........> - <abcd:abcd_list version="1" www.john_uncle's_server.com" xmlns: - <device id="100"> <firmware>12.4(3d)</firmware> <location id="500">Sitting Room</location> </device> - <device id="101"> <firmware>12.4(3d)</firmware> <location id="501">Class... (1 Reply)
Discussion started by: sureshcisco
1 Replies

6. Programming

extract xml data and create word document using perl.

hi, i have large xml file which contains students information, i need to extract student number and some address tags and create a word document for the extracted data. my data looking llike this <student> <number>24</number> <education>bachelors</education> ... (1 Reply)
Discussion started by: veerubiji
1 Replies

7. Programming

Extract xml data and create word document using perl.

Hi, I have large xml data file.I need to extract node and some tags in the node and after I need to create word document. my XMl data is look like as below -<student> <number>24</number> <education>bachelor</bachelor> <specialization>computers</specialization> ... (3 Replies)
Discussion started by: veerubiji
3 Replies

8. Shell Programming and Scripting

Shell script to extract data in repeating tags from xml

Hi, I am new to shell scripting. I need to extract data between repeating tags from an xml file and store the data in an array to process it further. <ns1:root xmlns:ns1="http://example.com/config"> <ns1:interface>in1</ns1:interface> <ns1:operation attribute1="true" attribute2="abd"... (2 Replies)
Discussion started by: sailendra
2 Replies

9. Shell Programming and Scripting

Extract strings from XML files and create a new XML

Hello everybody, I have a double mission with some XML files, which is pretty challenging for my actual beginner UNIX knowledge. I need to extract some strings from multiple XML files and create a new XML file with the searched strings.. The original XML files contain the source code for... (12 Replies)
Discussion started by: milano.churchil
12 Replies

10. Shell Programming and Scripting

In PErl script: need to read the data one file and generate multiple files based on the data

We have the data looks like below in a log file. I want to generat files based on the string between two hash(#) symbol like below Source: #ext1#test1.tale2 drop #ext1#test11.tale21 drop #ext1#test123.tale21 drop #ext2#test1.tale21 drop #ext2#test12.tale21 drop #ext3#test11.tale21 drop... (5 Replies)
Discussion started by: Sanjeev G
5 Replies
XML::SAX::Manifold(3pm) 				User Contributed Perl Documentation				   XML::SAX::Manifold(3pm)

NAME
XML::SAX::Manifold - Multipass processing of documents SYNOPSIS
use XML::SAX::Machines qw( Manifold ) ; my $m = Manifold( $channel0, $channel1, $channel2, { Handler => $h, ## optional } ); DESCRIPTION
XML::SAX::Manifold is a SAX machine that allows "multipass" processing of a document by sending the document through several channels of SAX processors one channel at a time. A channel may be a single SAX processor or a pipeline (see XML::SAX::Pipeline). The results of each channel are aggregated by a SAX filter that supports the "end_all" event, "XML::Filter::Merger" by default. See the section on writing an aggregator and XML::Filter::Merger. This differs from XML::Filter::SAXT in that the channels are prioritized and each channel receives all events for a document before the next channel receives any events. XML::SAX::Manifold buffers all events while feeding them to the highest priority channel ($processor1 in the synopsis), and replays them for each lower priority channel one at a time. The event flow for the example in the SYNOPSIS would look like the following, with the numbers next to the connection arrow indicating when the document's events flow along that arrow. +--------------------------------------------------------+ | An XML::SAX::Manifold instance | | | | +-----------+ | | +->| Channel_0 |-+ | | 1/ +-----------+ 1 | | Intake / | 1 | +------+ 2 +-----------+ 2 +--------+ Exhaust | --+->| Dist |---->| Channel_1 |-----*-->| Merger |---------+--> $h | +------+ +-----------+ / +--------+ | | 3 3/ | | +-----------+ / | | +->| Channel_2 |-+ | | +-----------+ | +--------------------------------------------------------+ Here's the timing of the event flows: 1: upstream -> Dist. -> Channel_0 -> Merger -> downstream 2: Dist. -> Channel_1 -> Merger -> downstream 3: Dist. -> Channel_2 -> Merger -> downstream When the document arrives from upstream, the events all arrive during time period 1 and are buffered and also passed through Channel_0 and Channel_0's output is sent to the Merger. After all events have been received (as indicated by an "end_document" event from upstream), all events are then played back through Channel_1 and then through Channel_2 (which also output to the Merger). It's the merger's job to assemble the three documents it receives in to one document; see XML::Filter::Merger for details. METHODS
new my $d = XML::SAX::Manifold->new( @channels, \%options ); Longhand for calling the Manifold function exported by XML::SAX::Machines. Writing an aggregator. To be written. Pretty much just that "start_manifold_processing" and "end_manifold_processing" need to be provided. See XML::Filter::Merger and it's source code for a starter. perl v5.10.0 2009-06-11 XML::SAX::Manifold(3pm)
All times are GMT -4. The time now is 04:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy