10-18-2008
Why don't you use some XML command line tool like xmlstarlet, some XML related Perl module or XMLgawk?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
well i have this xml file here: this file is called filereader.xml
<?xml version="1.0" encoding="UTF-8"?>
<file>
<file1>
<filecopy>/new/test/thefile.txt</filecopy>
<filecopy>/new/test/thefile2.ppt</filecopy>
</file1>
</file>
i need to write the script that search for the Bold text... (2 Replies)
Discussion started by: forevercalz
2 Replies
2. Shell Programming and Scripting
Hi All,
I am looking for a awk/shell which can find an element named REFERENCE in a XML file and check whether it is empty or not.
If there is no value in the REFERENCE element then correspondingly move the file to some other folder.
The Unix server is AIX version 4.
Any inputs... (9 Replies)
Discussion started by: karansachdeva
9 Replies
3. Shell Programming and Scripting
I have a rather large file with XML-style content. Each line contains one full XML entry. For example:
1:<Message><DNIS>1234</DNIS><UCID>3456</UCID><TransferGroup>XYZXYZ</TransferGroup></Message>
2:<Message><DNIS>9999</DNIS><UCID>2584</UCID><TransferGroup>ABCABC</TransferGroup></Message>... (1 Reply)
Discussion started by: sharpi03
1 Replies
4. UNIX Desktop Questions & Answers
Hi, I would need to read an xml element from an xml file to a local variable. Please could you help me with a shell script to get so? Considering that I have a file called file.xml like below:
<header>
<description>This is the description</description>
<content>This is the... (2 Replies)
Discussion started by: oscarmon
2 Replies
5. Shell Programming and Scripting
Any help to extract the root element from an XML file will be appreciated.
Example: test.xml
<?xml version="1.0" encoding="utf-8" ?>
<TestXMLMessage>
<TestRec>
<ID>1000</ID>
</TestRec>
</TestXMLMessage>
Wanted to extract the TestXMLMessage.
Regards,
Chari (6 Replies)
Discussion started by: sree_chari
6 Replies
6. Shell Programming and Scripting
Given this XML:
<?xml version="1.0"?>
<catalog>
<cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
<cd>
<title>Hide your heart</title>
... (2 Replies)
Discussion started by: ricksj
2 Replies
7. UNIX for Advanced & Expert Users
Hi,
I'm trying to write a script for some xml file handling, but I'm not getting too far with it.
I've got the following xml content
<?xml version="1.0" encoding="UTF-8"?>
<Test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<Operation name="OPER1">
<Action name="ACTION1">... (2 Replies)
Discussion started by: Juha
2 Replies
8. Shell Programming and Scripting
I want to check if every <Part> element has corresponding <Description> in this sample XML.
....<Lot Of XML>
<Inv lineNumber="2">
<Item>
... (4 Replies)
Discussion started by: kchinnam
4 Replies
9. UNIX for Dummies Questions & Answers
<?xml version = '1.0' encoding =... (8 Replies)
Discussion started by: Siva SQL
8 Replies
10. Shell Programming and Scripting
Hi Team,
I have a CSV file which I have to read through and needs to insert the content within an XML file using Python ONLY ( as most of the code base we have in python only). I managed to find the first part, missing how to insert to XML under "specific" tags.
cat input.csv... (0 Replies)
Discussion started by: panyam
0 Replies
LEARN ABOUT LINUX
dh_installxmlcatalogs
DH_INSTALLXMLCATALOGS(1) Debhelper DH_INSTALLXMLCATALOGS(1)
NAME
dh_installxmlcatalogs - install and register XML catalog files
SYNOPSIS
dh_installxmlcatalogs [debhelper options] [-n]
DESCRIPTION
dh_installxmlcatalogs is a debhelper program that installs and registers XML catalog files. It complies with the Debian XML/SGML policy.
The file debian/package.xmlcatalogs lists the local XML catalog files to be installed per package as well as the XML entities in those
local XML catalog files that are to be registered in the XML catalog system.
The local XML catalog file entries in that file should be of the form "local;source;dest", where the verbatim "local" indicates this is an
entry for a local XML catalog file, "source" indicates where the local XML catalog resides in the source tree, and "dest" indicates the
destination location for the local XML catalog under the package build area. "dest" should start with /usr/share/xml/.
The entries for the XML entities to be registered in the package XML catalog file should be of the form "package;type;id;catalog", where
the verbatim "package" indicates this is an entry for an XML entity to be registered in the package XML catalog file, "type" indicates the
XML entity type (public, system, uri), "id" indicates the XML entity id, and "catalog" indicates the local XML catalog file.
The entries for the XML entities to be registered in the root XML catalog file should be of the form "root;type;id", where the verbatim
"root" indicates this is an entry for an XML entity to be registered in the root XML catalog file, "type" indicates the XML entity type
(public, system, uri), and "id" indicates the XML entity id.
If an entry for is to be registered identically in the root catalog and the package catalog file, you can use the form
"root-and-package;type;id;catalog", where the verbatim "root-and-package" indicates this is an entry for an XML entity to be registered in
both the root and package XML catalog files, "type" indicates the XML entity type (public, system, uri), "id" indicates the XML entity id,
and "catalog" indicates the local XML catalog file.
XML entity types are described in update-xmlcatalog(8). Using the "root" or "package" commands, a type of "public" will general
"delegatePublic" statements in the applicable catalog file. Generally you will want to use the types "public" for any formal public
identifiers, and "system" for any files on the local filesystem or URLs. "uri" is only used for non-local files which are not part of the
external document subset, e.g., they are not used for entities or DTDs.
dh_installxmlcatalogs automatically adds maintainer script snippets for the registration and unregistration of the listed XML entities in
the XML catalog system (unless -n is used). A dependency on the xml-core package will be added to "${misc:Depends}", so be sure to use
that variable in the file debian/control. See dh_installdeb(1) for an explanation of Debhelper maintainer script snippets.
OPTIONS
-n, --noscripts
Do not modify postinst/postrm/prerm scripts.
NOTES
Note that this command is not idempotent. "dh_clean -k" should be called between invocations of this command. Otherwise, it may cause
multiple instances of the same text to be added to maintainer scripts.
SEE ALSO
debhelper(7)
/usr/share/doc/xml-core/
AUTHOR
Ardo van Rangelrooij <ardo@debian.org>
Adam Di Carlo <aph@debian.org>
perl v5.10.0 2008-10-14 DH_INSTALLXMLCATALOGS(1)