Sponsored Content
Top Forums Shell Programming and Scripting Parsing custom data into xml in Shell Post 302966526 by kshji on Saturday 13th of February 2016 03:01:09 AM
Old 02-13-2016
If you have huge data and need lot of this kind of processing, thenlook Postgresql ex. newest 9.5.
It has builtin really fast JSON and XML input parser using "COPY" and very fast output from JSONtoXML and XMLtoJSON. PG include datatypes JSON, JSONB, XML, ...

PG is SQL DB, but it's also one the fastest noSQL environment to handle JSON, CSV, XML, ... files.

Small json set I use jq to convert/parse but bigger data set I parse using PG command psql.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Parsing XML dynamic data via awk?

I am trying to use a line of output in an XML file as input in another new XML file for processing purposes via a shell script. Since I am a newbie though, I'm not sure how to do this since the data is different everytime. I am using this technique with static data right now: echo -n "Running... (5 Replies)
Discussion started by: corwin43
5 Replies

2. Shell Programming and Scripting

Parsing and getting data from XML file using ksh script

Hi All, I have a xml file for example as described below <xml> <address> <street><street> <address/> <isbn>426728783932020308393930303</isbn> <book> <name> </name> </book> . . . </xml> My problem is to get the isbn number from the above described file using ksh script. Could... (6 Replies)
Discussion started by: vinna
6 Replies

3. Shell Programming and Scripting

XML parsing through shell scritps

Hi, Am new to scripting. :) Am trying to figure out whether can i use bash scripting to parse an xml file. Parsing is not just pulling out information according to the pattern but its more of a generic parsing. I should identify the xml hierarchy and pull out information accordingly. It's not a... (2 Replies)
Discussion started by: karthikvela
2 Replies

4. Shell Programming and Scripting

Parsing posted XML data from a remote server?

Hi Is it possible to parse a posted xml data from a remote server in unix shell script. if so how to do that? and i need to give this script path in the push url (in remote server) . how to do this? I have tried this in asp but could not succeed....so am trying in shell scripting...the thread... (1 Reply)
Discussion started by: aemunathan
1 Replies

5. Shell Programming and Scripting

Parsing XML using Shell Script

Hello, I'm a starting shell scripter and no Perl knowledge. I've trying to do this for a while: I want to parse an XML file and get certain data out of it and write that data into a CSV file, all this using Shell Scripting (in Bash). Or Perl without any XML Parser/Interpreter (if possible). ... (1 Reply)
Discussion started by: Kage Musha
1 Replies

6. Shell Programming and Scripting

parsing data from xml file is failing can't open variable

Created a korn shell script, everything is is working except this section, the variable $SYSINFO is being set, but the NASIP & NASDEV are failing, it appears to be treating the config.xml file config directory and xml as the file. Need a second set of eyes to tell me where I am messing up. #... (3 Replies)
Discussion started by: juanb25
3 Replies

7. Shell Programming and Scripting

XML parsing in a shell script.

Below is a XML I have... <?xml version="1.0" encoding="UTF-8" ?> <component xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:XXXXX-www-Install-Manifest manifest.xsd" xmlns="urn:qqqqq-Install-Manifest" name="OM" ... (1 Reply)
Discussion started by: dashok.83
1 Replies

8. Shell Programming and Scripting

XML parsing using shell script

I have a xml file like this <bul:collectionStrategy name="strategy1"> <bul:collectionTemplateGroup name="15min group"/> <bul:collectionTemplateGroup name="hourly group"/> </bul:collectionStrategy> <bul:CollectionTemplateGroup name="hourly group" > ... (2 Replies)
Discussion started by: LavanyaP
2 Replies

9. Shell Programming and Scripting

Help - Parsing data in XML in Linux

Hi, I have an XML file in Linux and it contains a long string of characters. The last part of the file is like ....... ....... ....... CAD</MarketDescription></InvestorTransaction></AdvisorAccount></DivisionAdvisor></Division>... (3 Replies)
Discussion started by: naveed
3 Replies

10. Shell Programming and Scripting

Parsing XML (and insert data) then output data (bash / Solaris)

Hi folks I have a script I wrote that basically parses a bunch of config and xml files works out were to add in the new content then spits out the data into a new file. It all works - apart from the xml and config file format in the new file with XML files the original XML (that ends up in... (2 Replies)
Discussion started by: dfinch
2 Replies
Bio::Annotation::Comment(3pm)				User Contributed Perl Documentation			     Bio::Annotation::Comment(3pm)

NAME
Bio::Annotation::Comment - A comment object, holding text SYNOPSIS
$comment = Bio::Annotation::Comment->new(); $comment->text("This is the text of this comment"); $annotation->add_Annotation('comment', $comment); DESCRIPTION
A holder for comments in annotations, just plain text. This is a very simple object, and justifiably so. AUTHOR - Ewan Birney Email birney@ebi.ac.uk APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ new Title : new Usage : $comment = Bio::Annotation::Comment->new( '-text' => 'some text for this comment'); Function: This returns a new comment object, optionally with text filed Example : Returns : a Bio::Annotation::Comment object Args : a hash with -text optionally set AnnotationI implementing functions as_text Title : as_text Usage : Function: Example : Returns : Args : display_text Title : display_text Usage : my $str = $ann->display_text(); Function: returns a string. Unlike as_text(), this method returns a string formatted as would be expected for te specific implementation. One can pass a callback as an argument which allows custom text generation; the callback is passed the current instance and any text returned Example : Returns : a string Args : [optional] callback hash_tree Title : hash_tree Usage : Function: Example : Returns : Args : tagname Title : tagname Usage : $obj->tagname($newval) Function: Get/set the tagname for this annotation value. Setting this is optional. If set, it obviates the need to provide a tag to Bio::AnnotationCollectionI when adding this object. When obtaining an AnnotationI object from the collection, the collection will set the value to the tag under which it was stored unless the object has a tag stored already. Example : Returns : value of tagname (a scalar) Args : new value (a scalar, optional) Specific accessors for Comments text Title : text Usage : $value = $self->text($newval) Function: get/set for the text field. A comment object just holds a single string which is accessible through this method Example : Returns : value of text Args : newvalue (optional) value Title : value Usage : $value = $self->value($newval) Function: Alias of the 'text' method Example : Returns : value of text Args : newvalue (optional) type Title : type Usage : $value = $self->type($newval) Function: get/set for the comment type field. The comment type is normally found as a subfield within comment sections in some files, such as SwissProt Example : Returns : value of text Args : newvalue (optional) perl v5.14.2 2012-03-02 Bio::Annotation::Comment(3pm)
All times are GMT -4. The time now is 09:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy