The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Call unix script through informatica mapping Nishithinfy UNIX for Dummies Questions & Answers 0 09-11-2008 03:34 AM
Logging OWB mapping execution in Shell script npn Shell Programming and Scripting 1 11-16-2006 09:25 AM
Validating variables in shells script DeepakXavier Shell Programming and Scripting 1 09-23-2005 11:32 AM
unix script to export data from csv file to oracle database vinayagan Shell Programming and Scripting 3 07-20-2005 05:16 AM
Mapping a directory from Unix eric_hing UNIX for Dummies Questions & Answers 2 07-06-2003 01:04 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-08-2008
perlamohan perlamohan is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 13
Exclamation Can any one share a unix script for validating the export of a mapping which is in XM

Hi,
Can any one share a unix script for validating the export of a mapping which is in XML format.
like my requirment is that when ever we are migrating the mappings or wokflows from development to QA we will take the export of that mapping into an XML file.Insted of reviewing the mapping manually in the mapping designer we need to check the XML in such a way that if the mapping description is empty it should write a warning to a file and if there is any unconnected port the it should write a ERROR stating that the mapping is inVALID etc.
<MAPPING DESCRIPTION =" source file." ISVALID ="YES" NAME ="mstage1_etl" OBJECTVERSION ="1" VERSIONNUMBER ="5">
<TRANSFORMATION DESCRIPTION ="" NAME ="rtr__VALUES" OBJECTVERSION ="1" REUSABLE ="NO" TYPE ="Router" VERSIONNUMBER ="1">
<GROUP DESCRIPTION ="" NAME ="INPUT" ORDER ="1" TYPE ="INPUT"/>
<TRANSFORMFIELD DATATYPE ="string" DEFAULTVALUE ="" DESCRIPTION ="" GROUP ="INPUT" NAME ="out_flag_CONTROLGROUPID" PICTURETEXT ="" PORTTYPE ="INPUT" PRECISION ="10" SCALE ="0"/>
<TRANSFORMFIELD DATATYPE ="string" DEFAULTVALUE ="" DESCRIPTION ="" GROUP ="GRP_TARGET" NAME ="OFFER_NM1" PICTURETEXT ="" PORTTYPE ="OUTPUT" PRECISION ="200" REF_FIELD ="OFFER_NM" SCALE ="0"/>
<CONNECTOR FROMFIELD ="OPTIMIZATION" FROMINSTANCE ="Shortcut_to_t_9999_WeeklyAmexReportData_200712101" FROMINSTANCETYPE ="Source Definition" TOFIELD ="OPTIMIZATION" TOINSTANCE ="SQ_Shortcut_to_t_9999_WeeklyAmexReportData_200712101" TOINSTANCETYPE ="Source Qualifier"/>
<CONNECTOR FROMFIELD ="EVENT_TYPE" FROMINSTANCE ="Shortcut_to_t_9999_WeeklyAmexReportData_200712101" FROMINSTANCETYPE ="Source Definition" TOFIELD ="EVENT_TYPE" TOINSTANCE ="SQ_Shortcut_to_t_9999_WeeklyAmexReportData_200712101" TOINSTANCETYPE ="Source Qualifier"/>
</MAPPING>


above is a piece of mapping we need to pick the data from the tag <MAPPING> to </MAPPING>
information like the mapping NAME, number of output ports and for every output port the connection is existing in the connection tag.



please suggest me the outline picture how to implement this task

thanks in advance
perlamohan
  #2 (permalink)  
Old 11-09-2008
Annihilannic Annihilannic is offline Forum Advisor  
  
 

Join Date: May 2008
Location: Sydney, Australia
Posts: 1,009
I recommend you try using the perl XML::Parser module to do this. Check the CPAN documentation for examples.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:23 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0