![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| Help in extracting data with command from file in C | ahjiefreak | High Level Programming | 10 | 03-20-2008 11:26 PM |
| Extracting data from text file based on configuration set in config file | suparnbector | Shell Programming and Scripting | 3 | 08-10-2007 02:25 AM |
| Extracting Data from a File | oop | UNIX for Dummies Questions & Answers | 0 | 07-31-2007 11:48 AM |
| Extracting data from an AFP file | Dolph | UNIX for Advanced & Expert Users | 4 | 05-22-2007 04:29 AM |
| extracting recursive data file | bbeugie | UNIX for Dummies Questions & Answers | 1 | 06-16-2004 05:48 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi ppl out there...
Can anyone help me with the shell script to extract data from an xml file. My xml file looks like : - <servlet> <servlet-name>FrontServlet</servlet-name> <display-name>FrontServlet</display-name> <servlet-class>com.americanexpress.util.frontservlet.FrontServlet</servlet-class> - <init-param> <param-name>configurator</param-name> <param-value>XercesConfigurator</param-value> </init-param> - <init-param> <param-name>configFile</param-name> <param-value>/WEB-INF/ssofrontservletconfig.xml</param-value> </init-param> <load-on-startup>-1</load-on-startup> </servlet> I need to check whether the <param-name> is configFile and if it is , i have to extract the data in the <param-value> tag. To extract the data from the <param-value> , i have the following code snippet. /<param-value>/ { stp1=index($0,">")+1; newstr1=substr($0,stp1); etp1=index(newstr1,"</param-value>")-1; value=substr(newstr1,0,etp1); } Please help! |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|