How to insert subnode in xml file using xmlstarlet or any other bash command?
I have multiple xml files where i want to update a subnode if the subnode project points to different project or insert a subnode if it doesn't exist using a xmlstarlet or any other command that can be used in a bash script.
I have been able to update the subnode project if it doesn't point to the right project using xml starlet command, but i am not able to insert subnode project if the project tag doesn't exist.
I have tried.
The file looks like:
I want the output to look like:
The starlet command i used doesn't have any effect on the file. how can i fix the above problem? any pointers would be great help
Hi. Thanks for any help with this. I'm not new to programming but I am new to shell programming. I need a script that will
1. execute 'df -k' and return the volume names with specific text
2. surround each line of the above results in opening and closing xml tags
3. insert the results of step... (5 Replies)
I have a xmlfile like this:
<?xml version="1.0" encoding="utf-8"?>
<contentlocation xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns="http://wherein.yahooapis.com/v1/schema" xml:lang="en">
<processingTime>0.001538</processingTime>
... (1 Reply)
Hello,
I have the following variables set in my env
echo $MY_XSD_FILE
/home/jak/sample.xsd
echo $MY_INTERVAL_VALUE
4
I want to insert them between the xml tags in my xml file
cat sample.xml
:::::::::::::::
:::::::::::::::
<property name="FILE"></property>
:::::::::::::::::::::::... (2 Replies)
Hi,
i have an xml file and i want to edit a new sub node in a file
like
val="<activity android:label="@string/app_name" android_name=".MainActivity1" android:launchMode="singleTask" android:screenOrientation="portrait"
... (1 Reply)
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)
Hi All,
I need a help on inserting a XML tag.
Actual input
<var>
<nam>abcd</nam>
<a1>.</a1>
</var>
if tag <a1>.</a1> is getting missed in XML like below
<var>
<nam>abcd</nam>
</var>
i need to insert wherever it is missed after <nam> tag and before </var> tag.
Could anyone... (3 Replies)
Having a little trouble getting this to work just right.
I have xml files that i want to split some data.
I have 2 <name> tags within the file
I would like to take only the first tag and split the data.
tag example.
From this.
TAB<Name>smith, john</Name>
to
TAB<Name>smith,... (8 Replies)
hi all
i have a problem in the bash shell. i'd like insert in a variable a file for example :
i have a file datafine.log in this file there is :
17/JUN/2019
i want to insert the value of datafine.log in a variable.
Regards
Frncesco
edit by bakunin: please use CODE-tags for your data... (2 Replies)
I currently have a loop that reads all .bam files in a directory (wont always be 4 like in this example,
into $id. What I am trying to do, unsucessfully, is create specific new lines in an exsisting command using
each $id. Each new line would be:
--bam ${id} \
Tried
p=$dir... (8 Replies)
Discussion started by: cmccabe
8 Replies
LEARN ABOUT DEBIAN
fox
FOX(1) General Commands Manual FOX(1)NAME
fox - ab-initio structure determination from diffraction data
SYNOPSIS
fox [options] [file.xml]
DESCRIPTION
The fox (Free Objects for Crystallography) program was made for the ab initio crystal structure solution from diffraction data. Its most
interesting features for ab initio structure determination are:
* versatile description of the crystal contents;
* automatic correction for special positions and shared atoms between polyhedra;
* the ability to use simultaneously multiple powder patterns;
* smart global optimization algorithms;
* a graphical interface with a 3D crystal structure view and live updates during the optimization process.
OPTIONS
This program my be executed with or without command line options or input file (file.xml). It follows the usual GNU command line syntax,
with long options starting with two dashes (`-'). A summary of options is included below. For a complete description, see the fox wiki
http://objcryst.sourceforge.net/Fox/Manual
--help Show summary of options.
--loadfouriergrd map.grd
Load and display 'map.grd' fourier map with (first) crystal structure
--loadfourierdsn6 map.DN6
Load and display a DSN6 fourier map with (first) crystal structure
--nogui
Run without GUI, automatically launches optimization --nogui may be accompanied by the following options:
-n 10000
Run for 10000 trials at most (default: 1000000)
--nbrun 5
Do 5 runs, randomizing before each run (default: 1), use -1 to run indefinitely
-o out.xml
Output in 'out.xml'
--randomize
Randomize initial configuration
--silent
Produce (almost) no text output
--finalcost 0.15
Run optimization until cost < 0.15
--cif2pattern 1.5406 170 5000 .1
Simulate pattern for input crystal, wavelength=1.5406 up to 170o with 500 points anda peak width of 0.1o
EXAMPLES
Fox silicon.xml
Load file 'silicon.xml' and launch GUI.
Fox Cimetidine-powder.xml --nogui --randomize -n 1000000 -o best.xml
Load file 'ktartrate.xml', randomize, then make 1 optimization of 1 million trials, and save the best structure in 'best.xml'.
Fox Cimetidine-powder.xml --nogui --randomize -n 10000000 --nbrun 10 -o best.xml
Load file 'Cimetidine-powder.xml', then make 10 runs (starting from a random structure) of 10 million trials (each run saves one xml
file), and save the best structure in 'best.xml'.
Fox Cimetidine-powder.xml --nogui --silent --randomize -n 10000000 --nbrun 10 --finalcost 200000 -o best.xml
Load file 'Cimetidine-powder.xml', then make 10 silent runs of 10 million trials (each run saves one xml file), and save the best
structure in 'best.xml'. For each run, the optimization stops if the cost goes below 200000.
AUTHOR
fox was written by Vincent Favre-Nicolin <Vincent.Favre-Nicolin@cea.fr>.
This manual page was written by Carlo Segre <segre@debian.org>, for the Debian project (but may be used by others).
July 24, 2008 FOX(1)