Help required in Splitting a xml file into multiple and appending it in another .xml file
HI All,
I have to split a xml file into multiple xml files and append it in another .xml file. for example below is a sample xml and using shell script i have to split it into three xml files and append all the three xmls in a .xml file. Can some one help plz.
eg:
out put should be 3 xmls and it needs to be appended in a file:
This User Gave Thanks to ganesan kulasek For This Post:
Please help me on this.....
i have a file which has following content:
<IPCoreProducerConfig>
<Producer>
<config>
<key>machineId</key>
<value>machine1</value>
</config>
<config>
... (4 Replies)
To split the files
Hi,
I'm having a xml file with multiple xml header. so i want to split the file into multiple files.
Test.xml
---------
<?xml version="UTF_8">
<emp: ....>
<name>a</name>
<age>10</age>
</emp>
<?xml version="UTF_8">
<emp: ....>
<name>b</name>
<age>10</age>... (11 Replies)
Hi All,
I'm stuck with adding multiple lines(irrespective of line number) to a file before a particular xml tag. Please help me.
<A>testing_Location</A>
<value>LA</value>
<zone>US</zone>
<B>Region</B>
<value>Russia</value>
<zone>Washington</zone>
<C>Country</C>... (0 Replies)
Hi All,
I have more than half million lines of XML file , wanted to split in four files in a such a way that top 7 lines should be present in each file on top and bottom line of should be present in each file at bottom.
from the 8th line actual record starts and each record contains 15 lines... (14 Replies)
Hi Everyone,
I'm new here and I was checking this old post:
/shell-programming-and-scripting/180669-splitting-file-into-several-smaller-files-using-perl.html
(cannot paste link because of lack of points)
I need to do something like this but understand very little of perl.
I also check... (4 Replies)
Hi All,
We need to split a large xml into multiple valid xml with same header(2lines) and footer(last line) for N number of letterId.
In the example below we have first 2 lines as header and last line as footer.(They need to be in each split xml file)
Header:
<?xml version="1.0"... (5 Replies)
Hi,
I'm having a xml file with multiple xml header. so i want to split the file into multiple files.
Sample.xml consists multiple headers so how can we split these multiple headers into multiple files in unix.
eg :
<?xml version="1.0" encoding="UTF-8"?>
<ml:individual... (3 Replies)
Hello Shell Guru's
I have a requirement to split the source xml file into three different text file.
And i need your valuable suggestion to finish this.
Here is my source xml snippet, here i am using only one entry of <jms-system-resource>. There may be multiple entries in the source file.
... (5 Replies)
I want to write a one line script that outputs the result of multiple xml tags from a XML file. For example I have a XML file which has below XML tags in the file:
<EMAIL>***</EMAIL>
<CUSTOMER_ID>****</CUSTOMER_ID>
<BRANDID>***</BRANDID>
Now I want to grep the values of all these specified... (1 Reply)
I'm searching for the names of a TV show in the XML file I've attached at the end of this post. What I'm trying to do now is pull out/list the data from each of the <SeriesName> tags throughout the document. Currently, I'm only able to get data the first instance of that XML field using the... (9 Replies)
Discussion started by: hungryd
9 Replies
LEARN ABOUT DEBIAN
createrepo
createrepo(8)createrepo(8)NAME
createrepo - Create repomd (xml-rpm-metadata) repository
SYNOPSIS
createrepo [options] <directory>
DESCRIPTION
createrepo is a program that creates a repomd (xml-based rpm metadata) repository from a set of rpms.
OPTIONS -u --baseurl <url>
Optional base url location for all files. (not used by any clients at this time)
-o --outputdir <url>
Optional output directory (useful for read only media).
-x --exclude <package>
File globs to exclude, can be specified multiple times.
-i --pkglist <filename>
specify a text file which contains the complete list of files to include in the repository from the set found in the directory. File
format is one package per line, no wildcards or globs.
-q --quiet
Run quietly.
-g --groupfile <groupfile>
A precreated xml filename to point to for group information.
See examples section below for further explanation.
-v --verbose
Run verbosely.
-c --cachedir <path>
Specify a directory to use as a cachedir. This allows createrepo to create a cache of checksums of packages in the repository. In
consecutive runs of createrepo over the same repository of files that do not have a complete change out of all packages this
decreases the processing time dramatically.
--update
If metadata already exists in the outputdir and an rpm is unchanged (based on file size and mtime) since the metadata was generated,
reuse the existing metadata rather than recalculating it. In the case of a large repository with only a few new or modified rpms
this can significantly reduce I/O and processing time.
-C --checkts
Don't generate repo metadata, if their timestamps are newer than its rpms. This option decreases the processing time drastically
again, if you happen to run it on an unmodified repo, but it is (currently) mutual exclusive with the --split option.
--split
Run in split media mode. Rather than pass a single directory, take a set of directories corresponding to different volumes in a
media set.
-p --pretty
Output xml files in pretty format.
-V --version
Output version.
-h --help
Show help menu.
-d --database
Generate sqlite databases for use with yum.
EXAMPLES
Here is an example of a repository with a groups file. Note that the groups file should be in the same directory as the rpm packages (i.e.
/path/to/rpms/comps.xml).
createrepo -g comps.xml /path/to/rpms
FILES
repodata/filelists.xml.gz
repodata/other.xml.gz
repodata/primary.xml.gz
repodata/repomd.xml
SEE ALSO
yum (8) yum.conf (5)
AUTHORS
Seth Vidal <skvidal@phy.duke.edu>
BUGS
Any bugs which are found should be emailed to the mailing list: rpm-metadata@linux.duke.edu
Seth Vidal 2005 Jan 2 createrepo(8)