xml2, xmlstar(xmlstarlet) on Solaris10

I found there are 2 XML command line tools out there.

xml2
These tools are used to convert XML and HTML to and from a line-oriented format more amenable to processing by classic Unix pipeline processing tools
XMLStarlet Command Line XML Toolkit: Overview
XMLStarlet is a set of command line utilities (tools) which can be used to transform, query, validate, and edit XML documents


The latter is available on blastwave.org. So, it's just "pkg-get -i xmlstarlet" away.

As for 'xml2', it wasn't straightforward to compile it. Here's what I did.


$ perl -i -pe 's/-lxml/-lxml2/' Makefile.in
$ sed 's/libxml/libxml-2.0/' configure > configure.2
$ sh !$
sh configure.2
checking for a BSD-compatible install... ./install-sh -c
checking whether build environment is sane... yes
[...]
$ perl -i -pe 's|\\bparser.h|libxml/parser.h|;s|HTMLparser.h|libxml/HTMLparser.h|' \*.c
$ make
make  all-am
if gcc -DHAVE_CONFIG_H -I. -I. -I.  -I/usr/include/libxml2    -g -O2 -MT xml2.o -MD -MP -MF ".deps/xml2.Tpo" -c -o xml2.o xml2.c; \\ 
[...]
 
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today