Sponsored Content
Top Forums Shell Programming and Scripting Help with XML tag value extraction based on matching condition Post 303000578 by paul1234 on Friday 14th of July 2017 02:05:13 PM
Old 07-14-2017
Hi Ravinder ,
I had tried this already .The LocalId tag repeats in the file so I wanted to get the value of LocalId tag only if the Workspace value has the string "Contract Request".
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

perl regexp: matching the parent xml tag

Hi folks. I would like to remove the full parent (outer) xml tag from a file given a matching child (inner) tag, in a bash shell. To be more specific, this is what I have so far: $ cat myFile.xml <Sometag></Sometag> <Outer> <Inner>1</Inner> </Outer> <Outer> <stuff>alot</stuff> ... (3 Replies)
Discussion started by: BatManWSL
3 Replies

2. Shell Programming and Scripting

Remove lines from XML based on condition

Hi, I need to remove some lines from an XML file is the value within a tag is empty. Imagine this scenario, <acd><acdID>2</acdID><logon></logon></acd> <acd><acdID></acdID><logon></logon></acd> <acd><acdID></acdID><logon></logon></acd> <acd><acdID></acdID><logon></logon></acd> I... (3 Replies)
Discussion started by: giles.cardew
3 Replies

3. Shell Programming and Scripting

extract xml tag based on condition

Hi All, I have a large xml file of invoices. The file looks like below: <INVOICES> <INVOICE> <NAME>Customer A</NAME> <INVOICE_NO>1234</INVOICE_NO> </INVOICE> <INVOICE> <NAME>Customer A</NAME> <INVOICE_NO>2345</INVOICE_NO> </INVOICE> <INVOICE> <NAME>Customer A</NAME>... (9 Replies)
Discussion started by: angshuman
9 Replies

4. Shell Programming and Scripting

Check the value in xml based on condition

Hi, I have a log file having n number of xml's like the one below. <uOStatus xmlns:env="http://abc.org/def/ghi/"... (3 Replies)
Discussion started by: Neethu
3 Replies

5. Shell Programming and Scripting

Convert tag based lines to xml format

Hi All, Can some one help me to convert this line of code to xml format. Thanks in advance, preethy. input: ... (2 Replies)
Discussion started by: preethy
2 Replies

6. Shell Programming and Scripting

Multi line extraction based on condition

Hi I have some data in a file as below ****************************** Class 1A Students absent are : 1. ABC 2. CDE 3. CPE ****************************** Class 2A Students absent are : ****************************** Class 3A Students absent are : (6 Replies)
Discussion started by: reldb
6 Replies

7. Shell Programming and Scripting

Help with XML tag value extraction based on condition

sample xml file part <?xml version="1.0" encoding="UTF-8"?><ContractWorkspace xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" _LoadId="export_AJ6iAFmh+pQHq1" xsi:noNamespaceSchemaLocation="ContractWorkspace.xsd"> <_LocalId>CW2218471</_LocalId> <Active>true</Active> ... (3 Replies)
Discussion started by: paul1234
3 Replies

8. Shell Programming and Scripting

Help with tag value extraction from xml file based on a matching condition

Hi , I have a situation where I need to search an xml file for the presence of a tag <FollowOnFrom> and also , presence of partial part of the following tag <ContractRequest _LoadId and if these 2 exist ,then extract the value from the following tag <_LocalId> which is "CW2094139". There... (2 Replies)
Discussion started by: paul1234
2 Replies

9. UNIX for Beginners Questions & Answers

Replacing tag based on condition

Hi All, I am having a file like below. The file will having information about the records.If you see the file the file is header and data. For example it have 1 men tag and the tag id will be come after headers. The change is I want to convert All pets tag from P to X. I did a sed like below... (5 Replies)
Discussion started by: arunkumar_mca
5 Replies

10. Shell Programming and Scripting

Moving XML tag/contents after specific XML tag within same file

Hi Forum. I have an XML file with the following requirement to move the <AdditionalAccountHolders> tag and its content right after the <accountHolderName> tag within the same file but I'm not sure how to accomplish this through a Unix script. Any feedback will be greatly appreciated. ... (19 Replies)
Discussion started by: pchang
19 Replies
XmRegisterSegmentEncoding(library call) 								   XmRegisterSegmentEncoding(library call)

NAME
XmRegisterSegmentEncoding -- A compound string function that registers a compound text encoding format for a specified font list element tag SYNOPSIS
#include <Xm/Xm.h> char * XmRegisterSegmentEncoding( char *fontlist_tag, char *ct_encoding); DESCRIPTION
XmRegisterSegmentEncoding registers a compound text encoding format with the specified font list element tag. The XmCvtXmStringToCT func- tion uses this registry to map the font list tags of compound string segments to compound text encoding formats. Registering a font list tag that already exists in the registry overwrites the original entry. You can unregister a font list tag by passing a NULL value for the ct_encoding parameter. fontlist_tag Specifies the font list element tag to be registered. The tag must be a NULL-terminated ISO8859-1 string. ct_encoding Specifies the compound text character set to be used for segments with the font list tag. The value must be a NULL-terminated ISO8859-1 string. A value of XmFONTLIST_DEFAULT_TAG maps the specified font list tag to the code set of the locale. RETURN
Returns NULL for a new font list tag or the old ct_encoding value for an already registered font list tag. The application is responsible for freeing the storage associated with the returned data (if any) by calling XtFree. RELATED
XmCvtXmStringToCT(3), XmFontList(3), XmMapSegmentEncoding(3), and XmString(3). XmRegisterSegmentEncoding(library call)
All times are GMT -4. The time now is 02:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy