xml-coreutils-discuss Mailing List for xml-coreutils
Status: Alpha
Brought to you by:
lbreyer
You can subscribe to this list here.
| 2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
(4) |
Oct
|
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2015 |
Jan
|
Feb
(8) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2023 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Jason P. <ja...@go...> - 2023-03-09 23:42:11
|
Hi,
I can't seem to figure out how to select an attribute value.
I have tried many things and can't seem to get it to work.
I would expect something like this to do it:
jason@goodness> xml-ls --attributes .idea/modules/client.iml
':/module/component/content'
~/src/goodcover/core
<?xml version="1.0"?>
<root>
<content url="file://$MO...">
<sourceFolder url="file://$MO..." type="java-resou..."/>
<sourceFolder url="file://$MO..." isTestSource="false"/>
<sourceFolder url="file://$MO..." isTestSource="false" generated="true"/>
<excludeFolder url="file://$MO..."/>
</content>
</root>
jason@goodness> xml-ls --attributes .idea/modules/client.iml
':/module/component/content' | xml-printf '%s'
':string(/root/content/@url)' ~/src/goodcover/core
xml-printf: error: tag not found: stdin%s:string(/root/content/@url)
Cheers,
Jason
|
|
From: Jean-Christophe H. <jea...@gm...> - 2015-04-05 04:45:34
|
I'm using xml-less on an utf-8 encoded xml file that contains Japanese and the display in Terminal (OSX/Yosemite) is:
55 <tuv xml:lang="JA-JP">
56 <seg>0.2gE以?<8
58 </seg>
59 </tuv>
instead of being:
55 <tuv xml:lang="JA-JP">
56 <seg>0.2gE以下
58 </seg>
59 </tuv>
is there anything I can do on my side to fix that ?
Jean-Christophe Helary
|
|
From: <la...@lb...> - 2015-02-12 14:21:16
|
On 2015-02-12 07:18, Douglas Held wrote: > Maybe I am just criminally insane, but I could solve my problem with > the > following Java program. I would prefer however to learn to quickly use > the > xml-coreutils command line utilities... If you're not afraid of complexity, I would probably try an XSLT processor instead... Laird Breyer |
|
From: <la...@lb...> - 2015-02-12 14:10:19
|
Hi Douglas, On 2015-02-10 23:07, Douglas Held wrote: > In the event a blocking command such as xml-cat is run with incorrect > input > parameters, it is convenient (and customary) to cancel the command with > Ctrl-C. Thanks, this should be fixed in 0.8.2 I expect. Cheers, Laird Breyer |
|
From: <la...@lb...> - 2015-02-12 14:03:21
|
On 2015-02-12 07:20, Douglas Held wrote: >>> Goal: >>> I would like to extract only listings with floor plans, and only the >>> selected elements I am interested in, into a new document as: >>> <listings> >>> <listing> >>> <listing_id>1</listing_id> >>> <floor_plan>http://example.com/123456</floor_plan> >>> </listing> >>> <listings> >>> >>> I have tried commands such as: >>> # Create the target file >>> xml-echo -e "[listings@updated=20150210]" >listings.xml >>> # Copy selected elements into target >>> xml-cp page1.xml >>> :/response/listing/listing_id[/response/listing/floor_plan != null] >>> listings.xml :/listings/ I would not expect this to succeed as the condition in [] requires more advanced processing than xml-cp is currently coded to do. Perhaps an extension of xml-grep could handle this. I will have to think about it. Cheers, Laird Breyer |
|
From: <la...@lb...> - 2015-02-12 13:48:42
|
Hi Douglas, Thanks for your questions. I'll answer them each separately. The sample xml document you provided was very helpful. First, the following one: > Each /response/listing element has a //listing_id and some, but not all > listings have a floor_plan element. > > Goal: > I would like to extract only listings with floor plans, and only the > selected elements I am interested in, into a new document as: > <listings> > <listing> > <listing_id>1</listing_id> > <floor_plan>http://example.com/123456</floor_plan> > </listing> > <listings> You can extract the listing nodes as temporary xml files by using xml-find, eg xml-find page1.xml :/response/* -exec echo {-} ';' The {-} is the name of a temporary file which exists only as long as the echo command runs. If you had a script cmd.sh instead of echo, the script could open the file name {-} and process it. Alternatively, you can run bash executing a string of commands, like so: xml-find page1.xml :/response/* -exec bash -c 'if grep -q floor_plan {-} ; then xml-printf "id %s\nagent %s\n" {-} ://listing_id ://agent_name; fi' ';' (note the single quotes around the semicolon). The above will print plain text if the listing_id and agent_name exist, otherwise you'll get some error messages on stderr and no output. You could replace the plain grep with if xml-grep '.*' {-} ://floor_plan >/dev/null ; then ..... Also, if you prefer to have xml output, perhaps try xml-find page1.xml ://response/* -exec xml-grep '.*' {-} ://floor_plan ://listing_id ://agent_name ';' | xml-cat Here xml-grep outputs an xml fragment for each temporary file, and xml-cat reassembles the fragments into a single xml file. These ideas are probably the closest to the workflow you suggest below. > The workflow I would expect, based on the coreutils workflows I > normally > use, would be: > cat source.xml | while read element; do > if echo $element | grep -q floor_plan ; then > echo $element >> target.xml > fi > done > > It would be nice if I could use a complement of the above technologies > for > processing the XML. The below are imaginary pseudo-commands: > > xml-cat source.xml :/response/listing | while xml-read listing; do > # $listing is now an xml fragment of one listing element's full > content > if echo $listing | xml-grep -q ://floor_plan; then > cat $element | xml-egrep > "://listing|://listing/listing_id|://listing/floor_plan" | xml-insert > target.xml :/listings/ > fi > done Cheers, Laird Breyer |
|
From: Douglas H. <do...@do...> - 2015-02-11 20:20:32
|
for posterity, both of my == operators are erroneous and should be replaced
with .equals()
On Wed, Feb 11, 2015 at 8:18 PM, Douglas Held <do...@do...> wrote:
> Maybe I am just criminally insane, but I could solve my problem with the
> following Java program. I would prefer however to learn to quickly use the
> xml-coreutils command line utilities...
>
> import java.io.File;
> import java.io.IOException;
> import java.io.OutputStream;
> import java.io.OutputStreamWriter;
>
> import javax.xml.parsers.DocumentBuilderFactory;
> import javax.xml.transform.OutputKeys;
> import javax.xml.transform.Transformer;
> import javax.xml.transform.TransformerException;
> import javax.xml.transform.TransformerFactory;
> import javax.xml.transform.dom.DOMSource;
> import javax.xml.transform.stream.StreamResult;
>
> import org.w3c.dom.Document;
> import org.w3c.dom.Element;
> import org.w3c.dom.Node;
> import org.w3c.dom.NodeList;
>
>
> public class Search {
>
> public static void main(String[] args) throws Exception {
> Document output =
> DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
> output.appendChild( output.createElement( "listings" ) );
> System.out.println( output.getDocumentElement().toString() );
>
> Document input =
> DocumentBuilderFactory.newInstance().newDocumentBuilder().parse( new File(
> "/Users/douglasheld/zoopla/listings.xml" ) );
> NodeList listings = input.getElementsByTagName( "listing" );
> for ( int i=0; i<listings.getLength(); i++ ){
> Node listing = listings.item( i );
> boolean insert = false;
> Element newListing = output.createElement( "listing" );
> for ( int j=0; j < listing.getChildNodes().getLength(); j++){
> if ( listing.getChildNodes().item(j).getNodeName() ==
> "listing_id" ){
> newListing.setAttribute("id",
> listing.getChildNodes().item(j).getFirstChild().getNodeValue() );
> }
> if ( listing.getChildNodes().item(j).getNodeName() ==
> "floor_plan" ){
> insert = true;
> Element newFloorPlan = output.createElement(
> "floor_plan" );
> newFloorPlan.setTextContent(
> listing.getChildNodes().item(j).getFirstChild().getNodeValue() );
> newListing.appendChild( newFloorPlan );
> }
> }
> if ( insert ){
> output.getDocumentElement().appendChild( newListing );
> System.err.print( '.' );
> }
> }
> printDocument( output, System.out );
> }
>
> /* copy/paste from
> http://stackoverflow.com/questions/2325388/java-shortest-way-to-pretty-print-to-stdout-a-org-w3c-dom-document
> */
> public static void printDocument(Document doc, OutputStream out)
> throws IOException, TransformerException {
> TransformerFactory tf = TransformerFactory.newInstance();
> Transformer transformer = tf.newTransformer();
> transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION,
> "no");
> transformer.setOutputProperty(OutputKeys.METHOD, "xml");
> transformer.setOutputProperty(OutputKeys.INDENT, "yes");
> transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
> transformer.setOutputProperty("{
> http://xml.apache.org/xslt}indent-amount", "4");
>
> transformer.transform(new DOMSource(doc),
> new StreamResult(new OutputStreamWriter(out, "UTF-8")));
> }
> }
>
>
> On Wed, Feb 11, 2015 at 6:59 PM, Douglas Held <do...@do...>
> wrote:
>
>> I need some help getting my thinking in the xml-coreutils world.
>>
>> I have some prepared data in the format:
>> <response>
>> <listing>
>> <foo>foo</foo>
>> <bar>bar</bar>
>> <floor_plan>http://example.com/123456</floor_plan>
>> <listing_id>1</listing_id>
>> </listing>
>> <listing>
>> <listing_id>2</listing_id>
>> <foo>foo</foo>
>> <bar>bar</bar>
>> </listing>
>> </response>
>>
>> Each /response/listing element has a //listing_id and some, but not all
>> listings have a floor_plan element.
>>
>> Goal:
>> I would like to extract only listings with floor plans, and only the
>> selected elements I am interested in, into a new document as:
>> <listings>
>> <listing>
>> <listing_id>1</listing_id>
>> <floor_plan>http://example.com/123456</floor_plan>
>> </listing>
>> <listings>
>>
>> I have tried commands such as:
>> # Create the target file
>> xml-echo -e "[listings@updated=20150210]" >listings.xml
>> # Copy selected elements into target
>> xml-cp page1.xml
>> :/response/listing/listing_id[/response/listing/floor_plan != null]
>> listings.xml :/listings/
>>
>> I have read all the man pages and experimented with many different of the
>> xml-* commands. Very seldom do they work as I am hoping.
>>
>> The workflow I would expect, based on the coreutils workflows I normally
>> use, would be:
>> cat source.xml | while read element; do
>> if echo $element | grep -q floor_plan ; then
>> echo $element >> target.xml
>> fi
>> done
>>
>> It would be nice if I could use a complement of the above technologies
>> for processing the XML. The below are imaginary pseudo-commands:
>>
>> xml-cat source.xml :/response/listing | while xml-read listing; do
>> # $listing is now an xml fragment of one listing element's full content
>> if echo $listing | xml-grep -q ://floor_plan; then
>> cat $element | xml-egrep
>> "://listing|://listing/listing_id|://listing/floor_plan" | xml-insert
>> target.xml :/listings/
>> fi
>> done
>>
>> Perhaps by following my pseudo-logic, you can explain how I can carry out
>> these operations with xml-coreutils.
>>
>> I have attached one of my source files.
>>
>> Regards,
>> Doug
>> --
>> Douglas Held
>> do...@do...
>> +447775733093
>>
>
>
>
> --
> Douglas Held
> do...@do...
> +447775733093
>
--
Douglas Held
do...@do...
+447775733093
|
|
From: Douglas H. <do...@do...> - 2015-02-11 20:19:22
|
Maybe I am just criminally insane, but I could solve my problem with the
following Java program. I would prefer however to learn to quickly use the
xml-coreutils command line utilities...
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
public class Search {
public static void main(String[] args) throws Exception {
Document output =
DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
output.appendChild( output.createElement( "listings" ) );
System.out.println( output.getDocumentElement().toString() );
Document input =
DocumentBuilderFactory.newInstance().newDocumentBuilder().parse( new File(
"/Users/douglasheld/zoopla/listings.xml" ) );
NodeList listings = input.getElementsByTagName( "listing" );
for ( int i=0; i<listings.getLength(); i++ ){
Node listing = listings.item( i );
boolean insert = false;
Element newListing = output.createElement( "listing" );
for ( int j=0; j < listing.getChildNodes().getLength(); j++){
if ( listing.getChildNodes().item(j).getNodeName() ==
"listing_id" ){
newListing.setAttribute("id",
listing.getChildNodes().item(j).getFirstChild().getNodeValue() );
}
if ( listing.getChildNodes().item(j).getNodeName() ==
"floor_plan" ){
insert = true;
Element newFloorPlan = output.createElement(
"floor_plan" );
newFloorPlan.setTextContent(
listing.getChildNodes().item(j).getFirstChild().getNodeValue() );
newListing.appendChild( newFloorPlan );
}
}
if ( insert ){
output.getDocumentElement().appendChild( newListing );
System.err.print( '.' );
}
}
printDocument( output, System.out );
}
/* copy/paste from
http://stackoverflow.com/questions/2325388/java-shortest-way-to-pretty-print-to-stdout-a-org-w3c-dom-document
*/
public static void printDocument(Document doc, OutputStream out) throws
IOException, TransformerException {
TransformerFactory tf = TransformerFactory.newInstance();
Transformer transformer = tf.newTransformer();
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION,
"no");
transformer.setOutputProperty(OutputKeys.METHOD, "xml");
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
transformer.setOutputProperty("{
http://xml.apache.org/xslt}indent-amount", "4");
transformer.transform(new DOMSource(doc),
new StreamResult(new OutputStreamWriter(out, "UTF-8")));
}
}
On Wed, Feb 11, 2015 at 6:59 PM, Douglas Held <do...@do...> wrote:
> I need some help getting my thinking in the xml-coreutils world.
>
> I have some prepared data in the format:
> <response>
> <listing>
> <foo>foo</foo>
> <bar>bar</bar>
> <floor_plan>http://example.com/123456</floor_plan>
> <listing_id>1</listing_id>
> </listing>
> <listing>
> <listing_id>2</listing_id>
> <foo>foo</foo>
> <bar>bar</bar>
> </listing>
> </response>
>
> Each /response/listing element has a //listing_id and some, but not all
> listings have a floor_plan element.
>
> Goal:
> I would like to extract only listings with floor plans, and only the
> selected elements I am interested in, into a new document as:
> <listings>
> <listing>
> <listing_id>1</listing_id>
> <floor_plan>http://example.com/123456</floor_plan>
> </listing>
> <listings>
>
> I have tried commands such as:
> # Create the target file
> xml-echo -e "[listings@updated=20150210]" >listings.xml
> # Copy selected elements into target
> xml-cp page1.xml
> :/response/listing/listing_id[/response/listing/floor_plan != null]
> listings.xml :/listings/
>
> I have read all the man pages and experimented with many different of the
> xml-* commands. Very seldom do they work as I am hoping.
>
> The workflow I would expect, based on the coreutils workflows I normally
> use, would be:
> cat source.xml | while read element; do
> if echo $element | grep -q floor_plan ; then
> echo $element >> target.xml
> fi
> done
>
> It would be nice if I could use a complement of the above technologies for
> processing the XML. The below are imaginary pseudo-commands:
>
> xml-cat source.xml :/response/listing | while xml-read listing; do
> # $listing is now an xml fragment of one listing element's full content
> if echo $listing | xml-grep -q ://floor_plan; then
> cat $element | xml-egrep
> "://listing|://listing/listing_id|://listing/floor_plan" | xml-insert
> target.xml :/listings/
> fi
> done
>
> Perhaps by following my pseudo-logic, you can explain how I can carry out
> these operations with xml-coreutils.
>
> I have attached one of my source files.
>
> Regards,
> Doug
> --
> Douglas Held
> do...@do...
> +447775733093
>
--
Douglas Held
do...@do...
+447775733093
|
|
From: Douglas H. <do...@do...> - 2015-02-11 19:00:15
|
I need some help getting my thinking in the xml-coreutils world.
I have some prepared data in the format:
<response>
<listing>
<foo>foo</foo>
<bar>bar</bar>
<floor_plan>http://example.com/123456</floor_plan>
<listing_id>1</listing_id>
</listing>
<listing>
<listing_id>2</listing_id>
<foo>foo</foo>
<bar>bar</bar>
</listing>
</response>
Each /response/listing element has a //listing_id and some, but not all
listings have a floor_plan element.
Goal:
I would like to extract only listings with floor plans, and only the
selected elements I am interested in, into a new document as:
<listings>
<listing>
<listing_id>1</listing_id>
<floor_plan>http://example.com/123456</floor_plan>
</listing>
<listings>
I have tried commands such as:
# Create the target file
xml-echo -e "[listings@updated=20150210]" >listings.xml
# Copy selected elements into target
xml-cp page1.xml :/response/listing/listing_id[/response/listing/floor_plan
!= null] listings.xml :/listings/
I have read all the man pages and experimented with many different of the
xml-* commands. Very seldom do they work as I am hoping.
The workflow I would expect, based on the coreutils workflows I normally
use, would be:
cat source.xml | while read element; do
if echo $element | grep -q floor_plan ; then
echo $element >> target.xml
fi
done
It would be nice if I could use a complement of the above technologies for
processing the XML. The below are imaginary pseudo-commands:
xml-cat source.xml :/response/listing | while xml-read listing; do
# $listing is now an xml fragment of one listing element's full content
if echo $listing | xml-grep -q ://floor_plan; then
cat $element | xml-egrep
"://listing|://listing/listing_id|://listing/floor_plan" | xml-insert
target.xml :/listings/
fi
done
Perhaps by following my pseudo-logic, you can explain how I can carry out
these operations with xml-coreutils.
I have attached one of my source files.
Regards,
Doug
--
Douglas Held
do...@do...
+447775733093
|
|
From: Douglas H. <do...@do...> - 2015-02-10 12:07:42
|
In the event a blocking command such as xml-cat is run with incorrect input parameters, it is convenient (and customary) to cancel the command with Ctrl-C. Steps to reproduce: 1. build and install slang 2.1.4 on OS X 2. configure xml-coreutils 0.8.1 with: ./configure CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib 3. make and make install xml-coreutils 4. run the blocking command: cat 5. Type Ctrl-C to cancel the command. 6. run the blocking command: xml-cat 7. Type Ctrl-C to cancel the command. Expected results: 'xml-cat' should catch signal 2 and cancel the process just as 'cat' does. Actual results: 'xml-cat' does not cancel when Ctrl-C is pressed. Workaround: Input Ctrl-D (End-of-file) to cancel the process. -- Douglas Held do...@do... +447775733093 |
|
From: Rüdiger M. <swe...@gm...> - 2011-11-09 21:59:15
|
Hi Laird, As I've mentioned in my last PM email I have set up a git repo from your tar ball history. If you want you could fork it to use it for your further development. You may clone it to you local machine git clone https://github.com/rudimeier/xml-coreutils.git or even browse the nice web frontend here https://github.com/rudimeier/xml-coreutils Note the master branch there is exactly your tar ball history (0.4 - 0.8.1). I've omitted all autogenerated files (autotools, flex, bison ...). There is also another branch "build_fixes" where I've added several patches to make the build and "make check" more portable. Here you see it's compiling on most major distros, inclusive successful make check https://build.opensuse.org/package/show?package=xml-coreutils&project=home%3Arudi_m%3Abranches%3Autilities (The ones where it does not compile have too old expat installed, see build logs there) cu, Rudi |
|
From: <la...@lb...> - 2011-04-29 10:30:51
|
Hi Latha, On Fri, 29 Apr 2011 15:16:43 +0530, Latha Ganesan <la...@ai...> wrote: > Hi, > > I removed the link of libexpat.so and made it point to the new > library > And then the make & install of xml-coreutils worked I'm glad to hear that. FYI, the usual way to add a nonstandard library location is to do something like this: ./configure CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib Cheers, Laird Breyer. |
|
From: Latha G. <la...@ai...> - 2011-04-29 09:46:36
|
Hi,
I removed the link of libexpat.so and made it point to the new library
And then the make & install of xml-coreutils worked
Thanks for ur support
Regaards
latha
-----Original Message-----
From: Latha Ganesan
Sent: Friday, April 29, 2011 2:52 PM
To: Latha Ganesan; 'la...@lb...'
Cc: 'xml...@li...'
Subject: RE: [Xml-coreutils-discuss] Compilation Problem
Hi,
This is the output I got from expat install
make install
/bin/sh ./conftools/mkinstalldirs /usr/local/lib /usr/local/include
/bin/sh ./libtool --mode=install /usr/bin/install -c libexpat.la /usr/local/lib/libexpat.la
/usr/bin/install -c .libs/libexpat.so.1.5.2 /usr/local/lib/libexpat.so.1.5.2
(cd /usr/local/lib && { ln -s -f libexpat.so.1.5.2 libexpat.so.1 || { rm -f libexpat.so.1 && ln -s libexpat.so.1.5.2 libexpat.so.1; }; })
(cd /usr/local/lib && { ln -s -f libexpat.so.1.5.2 libexpat.so || { rm -f libexpat.so && ln -s libexpat.so.1.5.2 libexpat.so; }; })
/usr/bin/install -c .libs/libexpat.lai /usr/local/lib/libexpat.la
/usr/bin/install -c .libs/libexpat.a /usr/local/lib/libexpat.a
chmod 644 /usr/local/lib/libexpat.a
ranlib /usr/local/lib/libexpat.a
PATH="$PATH:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
for FN in ./lib/expat.h ./lib/expat_external.h ; do /usr/bin/install -c -m 644 $FN /usr/local/include ; done
/bin/sh ./conftools/mkinstalldirs /usr/local/bin /usr/local/man/man1
/bin/sh ./libtool --mode=install /usr/bin/install -c xmlwf/xmlwf /usr/local/bin/xmlwf
/usr/bin/install -c xmlwf/.libs/xmlwf /usr/local/bin/xmlwf
/usr/bin/install -c -m 644 ./doc/xmlwf.1 /usr/local/man/man1
And the env is as follows
MANPATH=/home/lathag/Linux/man/:/usr/swtools/man:/usr/share/man:/usr/local/man:/var/man:/usr/atria/doc/man
HOSTNAME=linuxpppoe.india.wirelessworld.airvananet.com
TERM=xterm
SHELL=/bin/bash
HISTSIZE=1000
SSH_CLIENT=::ffff:172.17.18.16 1242 22
VIEW_NAME=lathag_fap_dev
QTDIR=/usr/lib/qt-3.3
SSH_TTY=/dev/pts/6
USER=lathag
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
KDEDIR=/usr
CLEARCASE_CMDLINE=setview lathag_fap_dev
MAIL=/var/spool/mail/lathag
PATH=/usr/kerberos/sbin:./:./:./:./:./:./:./:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/opt/rational/clearcase/rhat_x86/bin:/usr/swtools/bin:/usr/local/bin:/usr/sbin:/sbin:/home/lathag/Linux/bin:/usr/local/sbin:/usr/bin/X11/:/usr/local/vtcl:/usr/local/netcom/smartlib/bin:.:/opt/rational/clearcase/linux_x86/bin:/usr/swtools/bin:/usr/local/bin:/usr/sbin:/sbin:/home/lathag/Linux/bin:/usr/local/sbin:/usr/bin/X11/:/usr/local/vtcl:/usr/local/netcom/smartlib/bin:.:/sbin:/usr/sbin:/home/lathag/bin:/opt/rational/common/bin:/opt/rational/clearquest/bin:/usr/atria/bin:/usr/local/bin:/bin:/usr/sbin:/usr/ucb:/usr/atria/bin:/bin:/usr/sbin:/usr/ucb:/usr/atria/bin:/opt/rational/clearcase/linux_x86/bin:/usr/swtools/bin:/usr/local/bin:/usr/sbin:/sbin:/home/lathag/Linux/bin:/usr/local/sbin:/usr/bin/X11/:/usr/local/vtcl:/usr/local/netcom/smartlib/bin:.:/sbin:/usr/sbin:/home/lathag/bin:/opt/rational/common/bin:/opt/rational/clearquest/bin:/usr/atria/bin:/usr/local/bin:/bin:/usr/sbin:/usr/ucb:/usr/atria/bin:/opt/rational/clearcase/linux_x86/bin:/usr/swtools/bin:/usr/local/bin:/usr/sbin:/sbin:/home/lathag/Linux/bin:/usr/local/sbin:/usr/bin/X11/:/usr/local/vtcl:/usr/local/netcom/smartlib/bin:.:/sbin:/usr/sbin:/home/lathag/bin:/opt/rational/common/bin:/opt/rational/clearquest/bin:/usr/atria/bin:/usr/local/bin:/bin:/usr/sbin:/usr/ucb:/usr/atria/bin:/opt/rational/clearcase/linux_x86/bin:/usr/swtools/bin:/usr/local/bin:/usr/sbin:/sbin:/home/lathag/Linux/bin:/usr/local/sbin:/usr/bin/X11/:/usr/local/vtcl:/usr/local/netcom/smartlib/bin:.:/sbin:/usr/sbin:/home/lathag/bin:/opt/rational/common/bin:/opt/rational/clearquest/bin:/usr/atria/bin:/usr/local/bin:/bin:/usr/sbin:/usr/ucb:/usr/atria/bin:/opt/rational/clearcase/linux_x86/bin:/usr/swtools/bin:/usr/local/bin:/usr/sbin:/sbin:/home/lathag/Linux/bin:/usr/local/sbin:/usr/bin/X11/:/usr/local/vtcl:/usr/local/netcom/smartlib/bin:.:/sbin:/usr/sbin:/home/lathag/bin:/opt/rational/common/bin:/opt/rational/clearquest/bin:/usr/atria/bin:/usr/local/bin:/bin:/usr/sbin:/usr/ucb:/usr/atria/bin:/opt/rational/clearcase/linux_x86/bin:/usr/swtools/bin:/usr/local/bin:/usr/sbin:/sbin:/home/lathag/Linux/bin:/usr/local/sbin:/usr/bin/X11/:/usr/local/vtcl:/usr/local/netcom/smartlib/bin:.:/sbin:/usr/sbin:/home/lathag/bin:/opt/rational/common/bin:/opt/rational/clearquest/bin:/usr/atria/bin:/usr/local/bin:/bin:/usr/sbin:/usr/ucb:/usr/atria/bin
LINKDIR=/usr/local/lib
LD_RUN_PATH=/home/lathag/xmlutils
INPUTRC=/etc/inputrc
PWD=/home/lathag/xmlutils/expat-2.0.1
SQUID_PASSWORD=airvana
CLEARCASE_ROOT=/view/lathag_fap_dev
EDITOR=vim
LANG=en_US.UTF-8
TZ=Asia/Calcutta
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
CF_OPTS=--enable-shared --disable-static
SHLVL=7
HOME=/root
LOGNAME=lathag
SQUID_USER=lathag
CVS_RSH=ssh
SSH_CONNECTION=::ffff:172.17.18.16 1242 ::ffff:10.204.3.2 22
LESSOPEN=|/usr/bin/lesspipe.sh %s
G_BROKEN_FILENAMES=1
_=/bin/env
Can u please suggest how I can fix the makefile of to make it work
Regards
latha
-----Original Message-----
From: Latha Ganesan
Sent: Friday, April 29, 2011 2:19 PM
To: 'la...@lb...'
Cc: xml...@li...
Subject: RE: [Xml-coreutils-discuss] Compilation Problem
Hi,
Thanks for the reply
I downloaded and installed Expat just now
Can u suggest how to purge system's Expat
package and reinstall.
Or can u specify how to make the makefile to look at /usr/local/lib/expat before others
I tried installing with xml-coreutils-0.8.1.tar.gz and even there I encountered the same issue
Regards
latha
-----Original Message-----
From: la...@lb... [mailto:la...@lb...]
Sent: Friday, April 29, 2011 12:48 PM
To: Latha Ganesan
Cc: xml...@li...
Subject: Re: [Xml-coreutils-discuss] Compilation Problem
Hi Latha,
On Fri, 29 Apr 2011 11:51:32 +0530, Latha Ganesan
<la...@ai...> wrote:
> gcc -funsigned-char -Wall -pedantic -g -O2 -o xml-cat xml-cat.o
> myerror.o mysignal.o common.o parser.o filelist.o io.o stdout.o mem.o
> entities.o cstring.o wrap.o -lslang -lncurses -lexpat -lm
> parser.o(.text+0x94): In function `stop_parser':
> /home/lathag/xmlutils/xml-coreutils-0.8a/src/parser.c:60: undefined
> reference to `XML_StopParser'
> parser.o(.text+0xc0): In function `restart_parser':
> /home/lathag/xmlutils/xml-coreutils-0.8a/src/parser.c:68: undefined
> reference to `XML_ResumeParser'
> parser.o(.text+0x694): In function `get_pstatus':
> /home/lathag/xmlutils/xml-coreutils-0.8a/src/parser.c:276: undefined
> reference to `XML_GetParsingStatus'
> collect2: ld returned 1 exit status
That's a strange error. It looks to me like your Expat library exists,
but it is missing some functions. Did you install the latest version of
Expat? If it's convenient, I would suggest purging your system's Expat
package and reinstalling.
If you installed Expat as a user in your home directory, I would
suggest checking your paths to see if there's another copy of the Expat
headers in the system.
BTW, there's a more recent xml-coreutils-0.8.1.tar.gz file in the
sourceforge download area.
Cheers,
Laird Breyer
|
|
From: Latha G. <la...@ai...> - 2011-04-29 09:21:44
|
Hi,
This is the output I got from expat install
make install
/bin/sh ./conftools/mkinstalldirs /usr/local/lib /usr/local/include
/bin/sh ./libtool --mode=install /usr/bin/install -c libexpat.la /usr/local/lib/libexpat.la
/usr/bin/install -c .libs/libexpat.so.1.5.2 /usr/local/lib/libexpat.so.1.5.2
(cd /usr/local/lib && { ln -s -f libexpat.so.1.5.2 libexpat.so.1 || { rm -f libexpat.so.1 && ln -s libexpat.so.1.5.2 libexpat.so.1; }; })
(cd /usr/local/lib && { ln -s -f libexpat.so.1.5.2 libexpat.so || { rm -f libexpat.so && ln -s libexpat.so.1.5.2 libexpat.so; }; })
/usr/bin/install -c .libs/libexpat.lai /usr/local/lib/libexpat.la
/usr/bin/install -c .libs/libexpat.a /usr/local/lib/libexpat.a
chmod 644 /usr/local/lib/libexpat.a
ranlib /usr/local/lib/libexpat.a
PATH="$PATH:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
for FN in ./lib/expat.h ./lib/expat_external.h ; do /usr/bin/install -c -m 644 $FN /usr/local/include ; done
/bin/sh ./conftools/mkinstalldirs /usr/local/bin /usr/local/man/man1
/bin/sh ./libtool --mode=install /usr/bin/install -c xmlwf/xmlwf /usr/local/bin/xmlwf
/usr/bin/install -c xmlwf/.libs/xmlwf /usr/local/bin/xmlwf
/usr/bin/install -c -m 644 ./doc/xmlwf.1 /usr/local/man/man1
And the env is as follows
MANPATH=/home/lathag/Linux/man/:/usr/swtools/man:/usr/share/man:/usr/local/man:/var/man:/usr/atria/doc/man
HOSTNAME=linuxpppoe.india.wirelessworld.airvananet.com
TERM=xterm
SHELL=/bin/bash
HISTSIZE=1000
SSH_CLIENT=::ffff:172.17.18.16 1242 22
VIEW_NAME=lathag_fap_dev
QTDIR=/usr/lib/qt-3.3
SSH_TTY=/dev/pts/6
USER=lathag
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
KDEDIR=/usr
CLEARCASE_CMDLINE=setview lathag_fap_dev
MAIL=/var/spool/mail/lathag
PATH=/usr/kerberos/sbin:./:./:./:./:./:./:./:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/opt/rational/clearcase/rhat_x86/bin:/usr/swtools/bin:/usr/local/bin:/usr/sbin:/sbin:/home/lathag/Linux/bin:/usr/local/sbin:/usr/bin/X11/:/usr/local/vtcl:/usr/local/netcom/smartlib/bin:.:/opt/rational/clearcase/linux_x86/bin:/usr/swtools/bin:/usr/local/bin:/usr/sbin:/sbin:/home/lathag/Linux/bin:/usr/local/sbin:/usr/bin/X11/:/usr/local/vtcl:/usr/local/netcom/smartlib/bin:.:/sbin:/usr/sbin:/home/lathag/bin:/opt/rational/common/bin:/opt/rational/clearquest/bin:/usr/atria/bin:/usr/local/bin:/bin:/usr/sbin:/usr/ucb:/usr/atria/bin:/bin:/usr/sbin:/usr/ucb:/usr/atria/bin:/opt/rational/clearcase/linux_x86/bin:/usr/swtools/bin:/usr/local/bin:/usr/sbin:/sbin:/home/lathag/Linux/bin:/usr/local/sbin:/usr/bin/X11/:/usr/local/vtcl:/usr/local/netcom/smartlib/bin:.:/sbin:/usr/sbin:/home/lathag/bin:/opt/rational/common/bin:/opt/rational/clearquest/bin:/usr/atria/bin:/usr/local/bin:/bin:/usr/sbin:/usr/ucb:/usr/atria/bin:/opt/rational/clearcase/linux_x86/bin:/usr/swtools/bin:/usr/local/bin:/usr/sbin:/sbin:/home/lathag/Linux/bin:/usr/local/sbin:/usr/bin/X11/:/usr/local/vtcl:/usr/local/netcom/smartlib/bin:.:/sbin:/usr/sbin:/home/lathag/bin:/opt/rational/common/bin:/opt/rational/clearquest/bin:/usr/atria/bin:/usr/local/bin:/bin:/usr/sbin:/usr/ucb:/usr/atria/bin:/opt/rational/clearcase/linux_x86/bin:/usr/swtools/bin:/usr/local/bin:/usr/sbin:/sbin:/home/lathag/Linux/bin:/usr/local/sbin:/usr/bin/X11/:/usr/local/vtcl:/usr/local/netcom/smartlib/bin:.:/sbin:/usr/sbin:/home/lathag/bin:/opt/rational/common/bin:/opt/rational/clearquest/bin:/usr/atria/bin:/usr/local/bin:/bin:/usr/sbin:/usr/ucb:/usr/atria/bin:/opt/rational/clearcase/linux_x86/bin:/usr/swtools/bin:/usr/local/bin:/usr/sbin:/sbin:/home/lathag/Linux/bin:/usr/local/sbin:/usr/bin/X11/:/usr/local/vtcl:/usr/local/netcom/smartlib/bin:.:/sbin:/usr/sbin:/home/lathag/bin:/opt/rational/common/bin:/opt/rational/clearquest/bin:/usr/atria/bin:/usr/local/bin:/bin:/usr/sbin:/usr/ucb:/usr/atria/bin:/opt/rational/clearcase/linux_x86/bin:/usr/swtools/bin:/usr/local/bin:/usr/sbin:/sbin:/home/lathag/Linux/bin:/usr/local/sbin:/usr/bin/X11/:/usr/local/vtcl:/usr/local/netcom/smartlib/bin:.:/sbin:/usr/sbin:/home/lathag/bin:/opt/rational/common/bin:/opt/rational/clearquest/bin:/usr/atria/bin:/usr/local/bin:/bin:/usr/sbin:/usr/ucb:/usr/atria/bin
LINKDIR=/usr/local/lib
LD_RUN_PATH=/home/lathag/xmlutils
INPUTRC=/etc/inputrc
PWD=/home/lathag/xmlutils/expat-2.0.1
SQUID_PASSWORD=airvana
CLEARCASE_ROOT=/view/lathag_fap_dev
EDITOR=vim
LANG=en_US.UTF-8
TZ=Asia/Calcutta
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
CF_OPTS=--enable-shared --disable-static
SHLVL=7
HOME=/root
LOGNAME=lathag
SQUID_USER=lathag
CVS_RSH=ssh
SSH_CONNECTION=::ffff:172.17.18.16 1242 ::ffff:10.204.3.2 22
LESSOPEN=|/usr/bin/lesspipe.sh %s
G_BROKEN_FILENAMES=1
_=/bin/env
Can u please suggest how I can fix the makefile of to make it work
Regards
latha
-----Original Message-----
From: Latha Ganesan
Sent: Friday, April 29, 2011 2:19 PM
To: 'la...@lb...'
Cc: xml...@li...
Subject: RE: [Xml-coreutils-discuss] Compilation Problem
Hi,
Thanks for the reply
I downloaded and installed Expat just now
Can u suggest how to purge system's Expat
package and reinstall.
Or can u specify how to make the makefile to look at /usr/local/lib/expat before others
I tried installing with xml-coreutils-0.8.1.tar.gz and even there I encountered the same issue
Regards
latha
-----Original Message-----
From: la...@lb... [mailto:la...@lb...]
Sent: Friday, April 29, 2011 12:48 PM
To: Latha Ganesan
Cc: xml...@li...
Subject: Re: [Xml-coreutils-discuss] Compilation Problem
Hi Latha,
On Fri, 29 Apr 2011 11:51:32 +0530, Latha Ganesan
<la...@ai...> wrote:
> gcc -funsigned-char -Wall -pedantic -g -O2 -o xml-cat xml-cat.o
> myerror.o mysignal.o common.o parser.o filelist.o io.o stdout.o mem.o
> entities.o cstring.o wrap.o -lslang -lncurses -lexpat -lm
> parser.o(.text+0x94): In function `stop_parser':
> /home/lathag/xmlutils/xml-coreutils-0.8a/src/parser.c:60: undefined
> reference to `XML_StopParser'
> parser.o(.text+0xc0): In function `restart_parser':
> /home/lathag/xmlutils/xml-coreutils-0.8a/src/parser.c:68: undefined
> reference to `XML_ResumeParser'
> parser.o(.text+0x694): In function `get_pstatus':
> /home/lathag/xmlutils/xml-coreutils-0.8a/src/parser.c:276: undefined
> reference to `XML_GetParsingStatus'
> collect2: ld returned 1 exit status
That's a strange error. It looks to me like your Expat library exists,
but it is missing some functions. Did you install the latest version of
Expat? If it's convenient, I would suggest purging your system's Expat
package and reinstalling.
If you installed Expat as a user in your home directory, I would
suggest checking your paths to see if there's another copy of the Expat
headers in the system.
BTW, there's a more recent xml-coreutils-0.8.1.tar.gz file in the
sourceforge download area.
Cheers,
Laird Breyer
|
|
From: Latha G. <la...@ai...> - 2011-04-29 08:48:56
|
Hi, Thanks for the reply I downloaded and installed Expat just now Can u suggest how to purge system's Expat package and reinstall. Or can u specify how to make the makefile to look at /usr/local/lib/expat before others I tried installing with xml-coreutils-0.8.1.tar.gz and even there I encountered the same issue Regards latha -----Original Message----- From: la...@lb... [mailto:la...@lb...] Sent: Friday, April 29, 2011 12:48 PM To: Latha Ganesan Cc: xml...@li... Subject: Re: [Xml-coreutils-discuss] Compilation Problem Hi Latha, On Fri, 29 Apr 2011 11:51:32 +0530, Latha Ganesan <la...@ai...> wrote: > gcc -funsigned-char -Wall -pedantic -g -O2 -o xml-cat xml-cat.o > myerror.o mysignal.o common.o parser.o filelist.o io.o stdout.o mem.o > entities.o cstring.o wrap.o -lslang -lncurses -lexpat -lm > parser.o(.text+0x94): In function `stop_parser': > /home/lathag/xmlutils/xml-coreutils-0.8a/src/parser.c:60: undefined > reference to `XML_StopParser' > parser.o(.text+0xc0): In function `restart_parser': > /home/lathag/xmlutils/xml-coreutils-0.8a/src/parser.c:68: undefined > reference to `XML_ResumeParser' > parser.o(.text+0x694): In function `get_pstatus': > /home/lathag/xmlutils/xml-coreutils-0.8a/src/parser.c:276: undefined > reference to `XML_GetParsingStatus' > collect2: ld returned 1 exit status That's a strange error. It looks to me like your Expat library exists, but it is missing some functions. Did you install the latest version of Expat? If it's convenient, I would suggest purging your system's Expat package and reinstalling. If you installed Expat as a user in your home directory, I would suggest checking your paths to see if there's another copy of the Expat headers in the system. BTW, there's a more recent xml-coreutils-0.8.1.tar.gz file in the sourceforge download area. Cheers, Laird Breyer |
|
From: <la...@lb...> - 2011-04-29 08:11:27
|
Hi Latha, On Fri, 29 Apr 2011 11:51:32 +0530, Latha Ganesan <la...@ai...> wrote: > gcc -funsigned-char -Wall -pedantic -g -O2 -o xml-cat xml-cat.o > myerror.o mysignal.o common.o parser.o filelist.o io.o stdout.o mem.o > entities.o cstring.o wrap.o -lslang -lncurses -lexpat -lm > parser.o(.text+0x94): In function `stop_parser': > /home/lathag/xmlutils/xml-coreutils-0.8a/src/parser.c:60: undefined > reference to `XML_StopParser' > parser.o(.text+0xc0): In function `restart_parser': > /home/lathag/xmlutils/xml-coreutils-0.8a/src/parser.c:68: undefined > reference to `XML_ResumeParser' > parser.o(.text+0x694): In function `get_pstatus': > /home/lathag/xmlutils/xml-coreutils-0.8a/src/parser.c:276: undefined > reference to `XML_GetParsingStatus' > collect2: ld returned 1 exit status That's a strange error. It looks to me like your Expat library exists, but it is missing some functions. Did you install the latest version of Expat? If it's convenient, I would suggest purging your system's Expat package and reinstalling. If you installed Expat as a user in your home directory, I would suggest checking your paths to see if there's another copy of the Expat headers in the system. BTW, there's a more recent xml-coreutils-0.8.1.tar.gz file in the sourceforge download area. Cheers, Laird Breyer |
|
From: Latha G. <la...@ai...> - 2011-04-29 06:33:58
|
Hi, On Linux OS , I am getting the following compilation error Making all in doc make[1]: Entering directory `/home/lathag/xmlutils/xml-coreutils-0.8a/doc' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/home/lathag/xmlutils/xml-coreutils-0.8a/doc' Making all in src make[1]: Entering directory `/home/lathag/xmlutils/xml-coreutils-0.8a/src' make all-recursive make[2]: Entering directory `/home/lathag/xmlutils/xml-coreutils-0.8a/src' Making all in . make[3]: Entering directory `/home/lathag/xmlutils/xml-coreutils-0.8a/src' gcc -funsigned-char -Wall -pedantic -g -O2 -o xml-cat xml-cat.o myerror.o mysignal.o common.o parser.o filelist.o io.o stdout.o mem.o entities.o cstring.o wrap.o -lslang -lncurses -lexpat -lm parser.o(.text+0x94): In function `stop_parser': /home/lathag/xmlutils/xml-coreutils-0.8a/src/parser.c:60: undefined reference to `XML_StopParser' parser.o(.text+0xc0): In function `restart_parser': /home/lathag/xmlutils/xml-coreutils-0.8a/src/parser.c:68: undefined reference to `XML_ResumeParser' parser.o(.text+0x694): In function `get_pstatus': /home/lathag/xmlutils/xml-coreutils-0.8a/src/parser.c:276: undefined reference to `XML_GetParsingStatus' collect2: ld returned 1 exit status make[3]: *** [xml-cat] Error 1 make[3]: Leaving directory `/home/lathag/xmlutils/xml-coreutils-0.8a/src' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/lathag/xmlutils/xml-coreutils-0.8a/src' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/lathag/xmlutils/xml-coreutils-0.8a/src' make: *** [all-recursive] Error 1 can u Suggest a workaround / resolution Regards latha |
|
From: Laird B. <la...@lb...> - 2010-09-14 00:15:33
|
On Sep 14 2010, Douglas Held wrote: > OK, now we're talking indeed. > > First, the problem is not reproducible. I must have had the old > libraries loaded, or old binaries in the buffer cache or > i-don't-know-what. But second, since trying the gdb command I get the > correct output with the blanks. > > Thanks for your time. I'll study the examples and ask a more > intelligent question next time. If I can reproduce any problem I'll > send a gdb stack trace or test case. Excellent! Feel free to ask nonintelligent :) questions about how the tools work, as it documents use-cases which can lead to UI improvements. I've actually just remembered why xml-grep doesn't grep the tree structure in the regex - it's to be specified on the command line after the file name: xml-grep --subtree '.*' 'core_java.xml' '://ControlflowRule' xml-cat core_java.xml | xml-grep --subtree '.*' '://ControlflowRule' If you "man 7 xml-coreutils", the section on the Common Unified Command Line Convention should explain the gist of it. Cheers, Laird. -- http://www.lbreyer.com The mind boggles, but does the Boggle mind? The mind boggles... |
|
From: Laird B. <la...@lb...> - 2010-09-13 23:11:35
|
On Sep 13 2010, Douglas Held wrote: > All right, I built 0.8b and the symptom looks similar. Please let me > know what debugging information I can provide. Thanks! Thanks, now we're ready to talk :) > douglas-helds-macbook-pro-2:2010Q3 douglasheld$ cat core_java.xml | > xml-grep --subtree 'ControlflowRule' > xml-grep: error: segmentation fault. This is a bug in xml-grep. I can only track it down if I have a sample XML which triggers it. Since you can't show me the XML, you can try giving me a stack trace in gdb if you're comfortable with that. gdb --args xml-grep 'ControlflowRule' core_java.xml Type "run", and after it segfaults, type "where". > douglas-helds-macbook-pro-2:2010Q3 douglasheld$ xml-cat core_java.xml > | xml-grep --subtree 'ControlflowRule' > <?xml version="1.0"?> > <root> > > > > > > > > > > > > </root> > douglas-helds-macbook-pro-2:2010Q3 douglasheld$ cat core_java.xml | > grep -m 1 'ControlflowRule' > <ControlflowRule formatVersion="3.2" language="java"> This is correct (ie intended) output. The xml-grep doesn't grep the tags, but only the strings in attributes or text nodes. For example, you should be able to get the output you expect with xml-cat core_java.xml | xml-grep '3.2' Most commands accept an XPATH type expression that lets you drill down in the tree structure. Some other commands that might do what you're looking for in your example are xml-ls '://ControlflowRule' 'core_java.xml' xml-cp 'core_java.xml' '://ControlflowRule[1]' stdout Laird. -- http://www.lbreyer.com The mind boggles, but does the Boggle mind? The mind boggles... |
|
From: Laird B. <la...@lb...> - 2010-09-13 21:19:25
|
Hi Doug, To make sure we're on the same page, can you do your test with the tarball I just uploaded to the files area called xml-coreutils-0.8b.tar.gz ? (It's the current snapshot of the code) Cheers, Laird. -- http://www.lbreyer.com The mind boggles, but does the Boggle mind? The mind boggles... |
|
From: Douglas H. <do...@do...> - 2010-09-13 11:26:15
|
Hi Laird,
I've got xml-coreutils 0.8 running on Mac OS X (Darwin Kernel Version
9.8.0:xnu-1228.15.4~1/RELEASE_I386) and have a variety of problems
trying to grep elements out of a 3MB valid xml file.
Full output is below, but in summary I am trying to refit the xml
utilities into my usual pattern:
cat file | grep 'expression'
I am not finding the utilities to work as I expect. Perhaps this is
usage or documentation. Can you advise? Thanks.
I cannot provide the xml file itself. Let me know if you need a test
case or if there is debug information I can obtain on my end.
Regards,
Doug
douglas-helds-macbook-pro-2:2010Q3 douglasheld$ xml-cat core_java.xml
| xml-grep --subtree 'ControlflowRule'
<?xml version="1.0"?>
<root>
</root>
douglas-helds-macbook-pro-2:2010Q3 douglasheld$ cat core_java.xml |
grep -m 1 'ControlflowRule'
<ControlflowRule formatVersion="3.2" language="java">
douglas-helds-macbook-pro-2:2010Q3 douglasheld$ cat core_java.xml |
xml-grep --subtree 'ControlflowRule'
xml-grep: error: segmentation fault.
douglas-helds-macbook-pro-2:2010Q3 douglasheld$ echo $?
1
douglas-helds-macbook-pro-2:2010Q3 douglasheld$
--
Douglas Held
do...@do...
+447986527654
|
|
From: Laird B. <la...@lb...> - 2010-05-16 11:54:12
|
Doug, The new tarball xml-coreutils-0.8a.tar.gz from the website should now fix all the issues you've had (including the ones we discussed privately, and some other issues with the installation script). I've gotten access to the GCC compile farm, so I am now able to test the code on several platforms when necessary. Laird. -- http://www.lbreyer.com The mind boggles, but does the Boggle mind? The mind boggles... |
|
From: Douglas H. <do...@do...> - 2010-05-11 07:08:20
|
On OS X I have the following problem compiling xmlcoreutils-0.8: douglas-helds-macbook-pro-2:xml-coreutils-0.8 douglasheld$ make Making all in doc make[1]: Nothing to be done for `all'. Making all in src make all-recursive Making all in . gcc -DHAVE_CONFIG_H -I. -funsigned-char -Wall -pedantic -g -O2 -MT xml-cat.o -MD -MP -MF .deps/xml-cat.Tpo -c -o xml-cat.o xml-cat.c mv -f .deps/xml-cat.Tpo .deps/xml-cat.Po gcc -DHAVE_CONFIG_H -I. -funsigned-char -Wall -pedantic -g -O2 -MT myerror.o -MD -MP -MF .deps/myerror.Tpo -c -o myerror.o myerror.c mv -f .deps/myerror.Tpo .deps/myerror.Po gcc -DHAVE_CONFIG_H -I. -funsigned-char -Wall -pedantic -g -O2 -MT mysignal.o -MD -MP -MF .deps/mysignal.Tpo -c -o mysignal.o mysignal.c mysignal.c:25:18: error: wait.h: No such file or directory make[3]: *** [mysignal.o] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all] Error 2 make: *** [all-recursive] Error 1 My configuration is attached. Can anybody suggest a fix? Doug -- Douglas Held do...@do... +447986527654 |
|
From: Laird B. <la...@lb...> - 2010-05-11 02:35:27
|
Welcome to the xml-coreutils-discuss mailing list. If you have questions, bug reports, patches, etc. that are related to the xml-coreutils project, please send them here. The official website for xml-coreutils is at http://xml-coreutils.sourceforge.net The latest version is 0.8. It compiles (certainly) on debian and ubuntu, and (probably) on bsd/mac. The website has some instructions on how to compile the code. For now there are no packages. The xml-coreutils are currently alpha software, and shouldn't be used for anything serious. Some of the commands are much more developed than others. You should probably start by reading the tutorial at http://xml-coreutils.sourceforge.net/xml_coreutils_tutorial.html Enjoy, Laird Breyer. -- http://www.lbreyer.com The mind boggles, but does the Boggle mind? The mind boggles... |