|
From: Andrew M. <And...@ar...> - 2009-08-27 09:19:14
|
This is probably a basic question, in which case sorry. I have spent
some time looking through the documentation and doing web-searches, but
have not managed to work out where I am going wrong.
I am trying to find something that can parse XML output from the
UCBerkeley open source structural analysis package OpenSees. It uses a
Tcl interpreter, so when I came across TclXML, I thought that this would
be ideal. However, I am getting a "can't find package" error, which
suggests that it can't find TclXML.
I am running Windows XP
I have downloaded and installed ActiveState ActiveTcl 8.5.4.0
It was not clear to me whether TclXML is included in ActiveTcl (and I
wasn't sure how to add it if it isn't)
I was taking a look at the documentation, and I came upon the following
example in the documentation (which gave me hope that TclXML *is*
included):
==========================
package require xml
proc EStart {varName name attlist args} {
upvar #0 $varName var
incr var
}
set count 0
set parser [::xml::parser -elementstartcommand [list EStart count]]
$parser parse [read stdin]
puts "The XML document contains $count elements"
==========================
I pasted the lines into a file that I called "XML-count-elements.tcl"
and I put an XML file called DFree.xml into the same directory. I
thought I could test it out using the following command line:
D:\OpenSees\XML> type DFree.xml | tclsh85 XML-count-elements.tcl
can't find package xml
while executing
"package require xml"
(file "XML-count-elements.tcl" line 1)
The process tried to write to a nonexistent pipe.
This suggests to me that TclXML is *not* included. If so, it would be
nice if this were stated in the documentation.
I therefore downloaded the package "tclxml-3.2.zip" from the website and
placed the files in the "C:\Tcl\lib" directory. However, this has not
solved my problem. Have I put them in the wrong place, or does this mean
that some compilation is required? This would be a show-stopper as I do
not have one and there would be problems in trying to get one.
Any advice?
Thanks,
Andrew
____________________________________________________________
Electronic mail messages entering and leaving Arup business
systems are scanned for acceptability of content and viruses
|