05-16-2015
There are a number of Python libraries than will convert JSON to XML
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Apologies if this has already been covered in this site somewhere, I did try looking but without any success. I am new to the whole XML thing, very late starter, and have a requirement to convert an XML fiule to a CSV fomat. I am crrently working on a Solaris OS. Does anyone have any suggestions,... (2 Replies)
Discussion started by: rossingi_33
2 Replies
2. Shell Programming and Scripting
Hii every one.
I have lots of .html files like:
<html>
<title>
</title>
<head>
</head>
<body>
<ul id="SummaryRatings">4 stars </ul>
<ul id="summaryList">
<p><b> Aurhor</b>
</p>
<p>wsfwfrfrtgretryetyrtyty</p>
</ul>
......
.......
</body>
</html> (6 Replies)
Discussion started by: kheyali Mitra
6 Replies
3. Shell Programming and Scripting
Can any one give the idea on this, please.
I have the following XML file and wants to convert into CSV(comma separated value) format.
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Waveset PUBLIC 'waveset.dtd' 'waveset.dtd'>
<Waveset>
<Object name='ra8736'>
<Attribute name='ADDRESS'... (2 Replies)
Discussion started by: kumar04
2 Replies
4. Shell Programming and Scripting
Hi,
I have an xml file and I want to convert it with awk in to a csv file
Test.xml
<Worksheet ss:Name="Map1">
<Table ss:ExpandedColumnCount="2" ss:ExpandedRowCount="2" x:FullColumns="1"
x:FullRows="1" ss:DefaultColumnWidth="60">
<Row>
<Cell><Data... (6 Replies)
Discussion started by: research3
6 Replies
5. Programming
Hi guys,
I'm in a job of converting a restful webservice to soap. Tool for convertation uses XQuery.
Now i need to convert a message like this:
{
"firstName": "John",
"midName": null,
"lastName": "Smith",
"married": false,
"address": {
"streetAddress": "21 2nd... (5 Replies)
Discussion started by: tien86
5 Replies
6. Shell Programming and Scripting
I need to convert below xml code to csv. I searched other posts as well but this post (_https://www.unix.com/shell-programming-scripting/174417-extract-parse-xml-data-statistic-value-csv.html) gives "sed command garbled" error. As of now I have written a long script to do it, but can it be done with... (7 Replies)
Discussion started by: dineshydv
7 Replies
7. Shell Programming and Scripting
I am in need of converting billions of XML into csv file to load data to DB, i have found the below code in perl but not sure why it's not working properly.
CODE:
#!/usr/bin/perl
# Script to illustrate how to parse a simple XML file
# and pick out all the values for a specific element, in... (1 Reply)
Discussion started by: rspwilliam
1 Replies
8. Shell Programming and Scripting
Is there a Unix or Perl script that converts JSON files to CSV or tab delimited format? We are running AIX 6.1.
Thanks in advance! (1 Reply)
Discussion started by: warpmail
1 Replies
9. UNIX for Beginners Questions & Answers
This is the sample json I have pasted here. I want all the IP address strings to be converted into an array. For example "10.38.32.202" has to be converted to everywhere in the JSON. There are multiple IPs in a JSON I am pasting one sample object from the JSON. But the IPs already in an Array... (11 Replies)
Discussion started by: vinshas1
11 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
I am new to shell scripting, Need your help in creating a shell script which converts any unix command output to JSON format output.
example:
sample df -h command ouput :
Filesystem size used avail capacity Mounted
/dev/dsk/c1t0d0s0 8.1G 4.0G 4.0G 50% /... (13 Replies)
Discussion started by: balu1234
13 Replies
LEARN ABOUT DEBIAN
dctrl2xml
dctrl2xml(1) dctrl2xml(1)
NAME
dctrl2xml - Debian control data to XML converter
SYNOPSIS
dctrl2xml [-x | -j] [-f FILE]
DESCRIPTION
dctrl2xml is a tool that converts Debian control data into an XML representation. It can be used to convert data which is normally found in
debian/control, .changes, .dsc, Packages, Sources, and similar files to XML.
For most fields dctrl2xml just uses the field name as element name and the field data as element content. For other fields, such as package
interrelationship fields (Depends, Build-Depends, etc.) or the Files field in .changes or Sources files, dctrl2xml additionally parses
their field data to represent it in a more fine-structured form.
OPTIONS
For a full summary of options, run dctrl2xml --help.
--version
Show dctrl2xml's version number.
-h, --help
Show help about options.
-f FILE, --file=FILE
Read Debian control data from file FILE instead of standard input. FILE can be either a plain text file or a gzip, bzip2 or ZIP
file.
-x, --xml
Output Debian control data as XML (default).
-j, --json
Output Debian control data as JSON.
EXAMPLES
dctrl2xml -f /var/lib/dpkg/available
Convert the whole dpkg(1) available file to XML and print it to standard output. This is a typical stress test for dctrl2xml.
apt-cache show hello build-essential | dctrl2xml
Convert the package records of the hello and build-essential packages to XML and print it to standard output. This is an example of
how dctrl2xml can be used in pipes where it reads the control data from standard input.
apt-cache showsrc hello | dctrl2xml | xmllint --format -
This is similar to the above example, except that the xmllint(1) tool (which is in the libxml2-utils Debian package) is used to re-
format and reindent dctrl2xml's output to make it more human readable and that the source package records of the hello package are
used.
apt-cache showsrc hello | dctrl2xml -j
In this example hello's source package record is printed as JSON instead of XML.
SEE ALSO
deb-control(5)
AUTHOR
Written by Frank S. Thomas <fst@debian.org>.
20 August 2010 dctrl2xml(1)