Sponsored Content
Top Forums Shell Programming and Scripting Merging a lot of XML documents in one Post 302607678 by corfuitl on Thursday 15th of March 2012 05:23:11 AM
Old 03-15-2012
Merging a lot of XML documents in one

Hi,

I have a very basic knowledge of shell scripting & would like some help with a little problem I have.

I have a lot of xml documents in a directory and I would like to merge them in one xml. The names of the documents are like:
111111___ΑΑ__Β-2005-2222___EN.xml
111111___ΑΑ__AΒ-2005-2222___EN.xml
111111___ΑΑ__2005-2222___ EN.xml
111111___ΑΑ__20052222___ EN.xml

The new xml document nust have this format:

<?xml version="1.0" encoding="UTF-8" standalone="no" lang="EN"?>
<testo>

<Document DocIDOrig = "111111" DocID = "2222" DocType = "AA" Proc = "COD-2012-06" YEAR="2005">
<body>
periexomeno
</body>
</Document>

<Document DocIDOrig = "11111x" DocID = "222x" DocType = "AA" Proc = "COD-2012-06" YEAR="2005">
<body>
periexomeno
</body>
</Document>

</
testo >

About the tags:
lang --- there is in the files' name
Document DocIDOrig ---- there is in the files' name
DocID ---- there is in the files' name
DocType ---- there is in the files' name
Proc ---- there is in the files' name or there is tag in the document
YEAR ---- there is in the files' name
BODY ---- there is in the xml document.

Thank you in advance!

Regards,

Gianni
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Printing documents using LaTeX

Hi I want to know how to give a file for printing using Latex formatting also where can I get the latex s/w . Thanks in advance (1 Reply)
Discussion started by: gosavi_ganesh
1 Replies

2. Solaris

sudo documents

I have installed sudo on our development server (SPARC,Solaris 9) and trying to edit /etc/sudoers file using visudo. Referred the following sites and not able to find the way. http://www.courtesan.com/sudo/man/sudoers.html http://www.kempston.net/solaris/sudo.html To start with sudo, my... (3 Replies)
Discussion started by: chrs0302
3 Replies

3. UNIX for Dummies Questions & Answers

LPD and sophisticated documents

Hi all, I am using Solaris 8 and have several printers (HP lasers or inkjets) connected behind PCs, printing thus being controlled by LPD. All I can print is ASCII, not very keen, no images, no boxes etc. Is there any thread (I assure, I have been searching!) or discussion explaning how to set... (0 Replies)
Discussion started by: nulnul7
0 Replies

4. Solaris

Batch converting documents

Here is the situation. We are a company that has been using a professional publishing system, the software is called "ProType". It runs on Solaris 2.4, however it is no longer supported and we are forced to move on to Adobe Indesign. We must convert all our documents (thousands) to InDesign format.... (4 Replies)
Discussion started by: Fred Goldman
4 Replies

5. OS X (Apple)

keyword searching of documents

Unix based fix-it needed? Platform and feature: search programs on Apple computers (Leopard or Tiger; 10.4 and above; Spotlight) Problem: the document search feature of these programs produce hits when keyword(s) used appear anywhere in the document's content. Change required: we need to... (1 Reply)
Discussion started by: Miles
1 Replies

6. Shell Programming and Scripting

How to search accross other documents?

Could do with some help on where to get started really. If anyone could help me it would be greatly appreciated. I have been working on this for a while now and I don't really know where to start. I am looking into creating a script that will process website hit files and output statistical... (1 Reply)
Discussion started by: amatuer_lee_3
1 Replies

7. Shell Programming and Scripting

Opening multiple documents at once

I'm trying this:$ for n in `ls` ; do xterm -e vim $n & ; done bash: syntax error near unexpected token `;' $I want to edit my files all at once, not one at a time. How can I do that? (2 Replies)
Discussion started by: Orange Stripes
2 Replies

8. AIX

books & documents

can someone tell me the name of the books for aix it is better if some one provide me links to any useful document (2 Replies)
Discussion started by: alokjyotibal
2 Replies

9. Shell Programming and Scripting

Simple XML file comparison and merging

Okay, first of all, thanks to everyone who's helped me out before... I appreciate the opportunity to learn. I have two iTunes XML files, and I simply want to compare the contents, then merge. Theoretically, this will allow me to merge two libraries, keeping playlists intact (depending on iTunes'... (4 Replies)
Discussion started by: karlp
4 Replies

10. UNIX for Dummies Questions & Answers

2 (two) here documents in a row

Ok, it may sound a bit stupid but I can't find the answer.. How do one put 2 here documents in a row? for instance, i want to do something like: diff <<eof <<eof2 # doesn't work... > a > b > eof > a > c > eof2 its mostly to satisfy my curiosity!! thanks, Anthony (4 Replies)
Discussion started by: anthalamus
4 Replies
intltool-merge(1)						   User Commands						 intltool-merge(1)

NAME
intltool-merge - merge translated strings into various file types, such as XML SYNOPSIS
intltool-merge [--desktop-style] [--help] [--keys-style] [--oaf-style] [--pass-through] [--quiet] [--utf8] [--version] [--xml-style] po- directory filename output-file DESCRIPTION
intltool-merge merges translated strings in .po files in po-directory with the original application file filename, to create the file out- put-file which contains both the original and the localized strings. Afterwards, the application XML file contains repeated xml-nodes, where each xml--node contains one of all translations and an xml:lang attribute. OPTIONS
The following options are supported: --desktop-style Include translations in the desktop style. You can also use -d to specify this option. --help Show usage and basic help information. You can also use -h to specify this option. --keys-style Include translations in the keys style. You can also use -k to specify this option. --oaf-style Include translations in the oaf style. You can also use -o to specify this option. --pass-through Use strings as found in .po files, without conversion (not recommended). You can also use -p to specify this option. --quiet Operate in quiet mode; do not provide feedback. You can also use -q to specify this option. --schemas-style Include translations in the schemas style. You can also use -s to specify this option. --utf8 Convert all strings to UTF-8 encoding before merging. You can also use -u to specify this option. --version Show version information. You can also use -v to specify this option. --xml-style Include translations in the standard XML style. You can also use -x to specify this option. OPERANDS
The following operands are supported: po-directory Specifies the location of the translated .po files. filename Specifies the name of the original application file. output-file Specifies the name of the file to be created by the intltool-merge command, to contain both the original and the localized strings. EXAMPLES
Example 1: Merging the Contents of the Translated .po Files in the po Directory With the Original File foo.desktop.in to Create foo.desktop example% intltool-merge ./po foo.desktop.in foo.desktop -d -u EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/intltool-merge The command-line executable for the application. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-common-devel | +-----------------------------+-----------------------------+ |Interface stability |External | +-----------------------------+-----------------------------+ SEE ALSO
intltool-extract(1), intltool-prepare(1), intltool-unicodify(1), intltool-update(1), intltoolize(1) NOTES
For more information, see the I18N-HOWTO file, which is provided with the intltool source code. Updated by Damien Donlon, Sun Microsystems Inc., 2003. Written by Darin Adler, Kenneth Christiansen, Maciej Stachowiak. SunOS 5.10 3 Apr 2003 intltool-merge(1)
All times are GMT -4. The time now is 07:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy