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)
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)
Hi All, Prepare a perl script for extracting data from xml file. The xml data look like as
AC StartTime="1227858839" ID="88" ETime="1227858837" DSTFlag="false" Type="2" Duration="303" />
<AS StartTime="1227858849" SigPairs="119 40 98 15 100 32 128 18 131 23 70 39 123 20 120 27 100 17 136 12... (3 Replies)
I want to extract the last rows of a data file, similar to that one below:
C1 xxx
C2 rrr
C3 ttt
....
Cn-1 hhh
Cn bbb
C1 yyy
C2 sss
C3 uuu
...
Cn-1 iii
Cn ccc
...
I just want to extract the final rows between C1 and Cn at each data file. n is not a constant,... (2 Replies)
I have a XML in which <Amt Ccy="EUR">3.1</Amt> tag repeats. This is under another tag <Main>. I need to sum all the values of <Amt Ccy=""> (Ccy may vary) coming under <Main> using awk and or sed command.
can some help?
Sample looks like below
<root>
<Main>
... (6 Replies)
Hi unix Gurus,
I am really new to Unix Scripting. Please help me to create a shell script which reads the xml file and from that i need to fetch a particular information.
For example
<SOURCE BUSINESSNAME ="" DATABASETYPE ="Teradata" DBDNAME ="DWPROD3" DESCRIPTION ="" NAME... (2 Replies)
Hi evry1,
This is my 1st post in this forum.Pls help me
I want to extract some data froma xml file which has 2000 lines using shell scripting. Actually my xml file has some "audio and video codes" which i need to arrange in a column wise format after extracting it using shell scripting.I... (4 Replies)
Hi ,
I have input file as XML. following are input data
#complex.xml
Code:
<?xml version="1.0" encoding="UTF-8"?><TEST_doc xmlns="http://www.w3.org/2001/XMLSchema-instance"> <ENTRY uid="123456"> <protein> <name>PROT001</name> <organism>Human</organism> ... (1 Reply)
Hi
I have xml file with multiple records and would like to extract records from xml with specific condition if specific tag is present extract entire row otherwise skip .
<logentry revision="21510">
<author>mantest</author>
<date>2015-02-27</date>
<QC_ID>334566</QC_ID>... (12 Replies)
Hi everyone,
So i'm struggling with an xml (log file) where we get information about some devices, so the logfile is filled with multiple "blocks" like that.
Based on the <devId> i want to extract this part of the xml file. If possible I want it to have an script for this, cause we'll use... (5 Replies)
Discussion started by: Pouky
5 Replies
LEARN ABOUT FREEBSD
xo
XO(1) BSD General Commands Manual XO(1)NAME
xo -- emit formatted output based on format string and arguments
SYNOPSIS
xo [-options] [argument...]
DESCRIPTION
The xo utility allows command line access to the functionality of the libxo library. Using xo, shell scripts can emit XML, JSON, or HTML
using the same commands that emit text output.
--close <path> Close tags for the given path
--depth <num> Set the depth for pretty printing
--help Display this help text
--html OR -H Generate HTML output
--json OR -J Generate JSON output
--leading-xpath <path>
Add a prefix to generated XPaths (HTML)
--open <path> Open tags for the given path
--pretty OR -p Make 'pretty' output (add indent, newlines)
--style <style> Generate given style (xml, json, text, html)
--text OR -T Generate text output (the default style)
--version Display version information
--warn OR -W Display warnings in text on stderr
--warn-xml Display warnings in xml on stdout
--wrap <path> Wrap output in a set of containers
--xml OR -X Generate XML output
--xpath Add XPath data to HTML output
The xo utility accepts a format string suitable for xo_emit(3) and a set of zero or more arguments used to supply data for that string.
xo "The {k:name} weighs {:weight/%d} pounds.0 fish 6
TEXT:
The fish weighs 6 pounds.
XML:
<name>fish</name>
<weight>6</weight>
JSON:
"name": "fish",
"weight": 6
HTML:
<div class="line">
<div class="text">The </div>
<div class="data" data-tag="name">fish</div>
<div class="text"> weighs </div>
<div class="data" data-tag="weight">6</div>
<div class="text"> pounds.</div>
</div>
The --wrap <path> option can be used to wrap emitted content in a specific hierarchy. The path is a set of hierarchical names separated by
the '/' character.
xo --wrap top/a/b/c '{:tag}' value
XML:
<top>
<a>
<b>
<c>
<tag>value</tag>
</c>
</b>
</a>
</top>
JSON:
"top": {
"a": {
"b": {
"c": {
"tag": "value"
}
}
}
}
The --open <path> and --close <path> can be used to emit hierarchical information without the matching close and open tag. This allows a
shell script to emit open tags, data, and then close tags. The --depth option may be used to set the depth for indentation. The
--leading-xpath may be used to prepend data to the XPath values used for HTML output style.
#!/bin/sh
xo --open top/data
xo --depth 2 '{tag}' value
xo --close top/data
XML:
<top>
<data>
<tag>value</tag>
</data>
</top>
JSON:
"top": {
"data": {
"tag": "value"
}
}
EXAMPLE
% xo 'The {:product} is {:status}0 stereo "in route"
The stereo is in route
% xo -p -X 'The {:product} is {:status}0 stereo "in route"
<product>stereo</product>
<status>in route</status>
ADDITIONAL DOCUMENTATION
Complete documentation can be found on github:
http://juniper.github.io/libxo/libxo-manual.html
libxo lives on github as:
https://github.com/Juniper/libxo
The latest release of libxo is available at:
https://github.com/Juniper/libxo/releases
SEE ALSO libxo(3), xo_emit(3)HISTORY
The libxo library was added in FreeBSD 11.0.
AUTHOR
Phil Shafer
BSD December 4, 2014 BSD