I have a xml in which I have to remove unused element nodes. Here are the requirements
1. Remove StoreAddresses & Contacts complex element directly
2. Remove StoreItemCharacteristic element based on CharacteristicName="Organic"
Here is the sample xml
For (1), I was able to remove using sed command
above commands are deleting entire node from start tag to end tag As Desired
For (2), I am not getting how to delete from start tag (<StoreItemCharacteristic ... </StoreItemCharacteristic>) to end tag based on condition CharacteristicName="Organic". Please help me how can I achieve this
Hi,
I am stripping the below file based on a pattern:
**Starts**02-MAY-2017 03:48:13
**Ends**02-MAY-2017 03:48:13
+---------------------------------------------------------------------------+
Start of log messages ... (2 Replies)
Hello to all,
I'd like to tabulate the content of the XML file below, I've been trying with AWK putting the Top node (<KIND>) as RS and so far I'm able to print the first and second field of each record, but I don't know how to continue with the following nodes that have more inner nodes.
The... (4 Replies)
I want to check if every <Part> element has corresponding <Description> in this sample XML.
....<Lot Of XML>
<Inv lineNumber="2">
<Item>
... (4 Replies)
Any help to extract the root element from an XML file will be appreciated.
Example: test.xml
<?xml version="1.0" encoding="utf-8" ?>
<TestXMLMessage>
<TestRec>
<ID>1000</ID>
</TestRec>
</TestXMLMessage>
Wanted to extract the TestXMLMessage.
Regards,
Chari (6 Replies)
Hi, I would need to read an xml element from an xml file to a local variable. Please could you help me with a shell script to get so? Considering that I have a file called file.xml like below:
<header>
<description>This is the description</description>
<content>This is the... (2 Replies)
I have a rather large file with XML-style content. Each line contains one full XML entry. For example:
1:<Message><DNIS>1234</DNIS><UCID>3456</UCID><TransferGroup>XYZXYZ</TransferGroup></Message>
2:<Message><DNIS>9999</DNIS><UCID>2584</UCID><TransferGroup>ABCABC</TransferGroup></Message>... (1 Reply)
Hi All
Can someone please help me with this awk to search an element in a XML file with a particular value and then change the root element.
Thanks & Regards
Karan (9 Replies)
Hi folks,
I'm a bit of a novice at this but here goes. I want to read in nodes from an XML file, and map the path to each.
eg the file is structured
<node><nodename>.</nodename>
<node><nodename>topnode</nodename>
<node><nodename>subnode1</nodename></node>
... (1 Reply)