|
|
xml2var
xml2var is part of SoL System Tools. xml2var is an XML-file parser, which converts XML-tags to shell variables.
Features
xml2var is a main part of the SoL boot technology. It offers a fast and easy way to use XML based configuration files for shell (BASH) scripts.
xml2var is used in the SoL boot technology and in SoLrus, the SoL update system.
Download
The latest version of xml2var is 2.0
xml2var source package: xml2var-v2.tar.bz2
Older versions: xml2var-v1.tar.bz2
xml2var was included into Mandrake-Linux. So there are prebuilt RPM packages for various architectures available. We recomend using SoLrus or download and compile by hand. If you still want the RPM please visit:
rpmseek
Installation
- Extract the tarball:
tar -zxvf xml2var-*
- Compile the program and install it:
make all; make install
- Read the manual: man xml2var
- For more details read the README.
Example
A test.xml file could look like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<package>
<name val="xml2var"/>
<maintainer val="antitachyon"/>
<version tag="1.0"/>
</package>
xml2var converts this XML data into shell (bash) variables. The result looks like this:
package_name_val[0]="xml2var";
package_maintainer_val[0]="antitachyon";
package_version_tag[0]="1.0";
Feedback & Links
|