Hi,
This is the xml file that i have.
- <front-servlet platform="WAS4.0" request-retriever="SiteMinder-aware" configuration-rescan-interval="60000">
<concurrency-throttle maximum-concurrency="50" redirect-page="/jsp/defaulterror.jsp" />
- <loggers>
<instrumentation... (5 Replies)
Hi, i am not able to get an approach for converting xml file to flat file using awk programming. Can anyone help me out.
The input xml is like this:
<outer>
<field1>one</field1>
<field2>two</field2>
<field3>three<Error Code=777 Description=12345/></field3>
<field4>four</field4>
</outer>... (2 Replies)
Hi,
I have to make an script according to these:
- I have couples of files like:
xxxxxxxxxxxxx.csv
xxxxxxxxxxxxx_desc.xml
- every xml file has diferent fields, but keeps this format:
........
<defaultName>2011-02-25T16:43:43.582Z</defaultName>
........... (2 Replies)
Hi ! I'm working into my first bash script to make some xml modification and it's going to make me crazy lol .. so I decide to try into this forum to take some ideas from people that really know about this!
This is my situation I've and xml file with a lots of positional values with another tags... (9 Replies)
I have an XML tag like this:
<property name="agent" value="/var/tmp/root/eclipse" />
Is there way using awk that i can get the value from the above tag. So the output should be:
/var/tmp/root/eclipse
Help will be appreciated.
Regards,
Adi (6 Replies)
Hello,
I work under Windows Vista and I am compiling an open-source stemmer dictionary for English and eventually for other Indian languages. The Engine which I have written has spewed out all lemmatised/expanded forms of the words: Nouns, Adjectives, Adverbs etc. Each set of expanded forms is... (4 Replies)
Dear All ,
i stuck in one problem executing xml .. i have input xml as
<COMMAND name="ARRANGEMENT.WRITE" timestamp="0" so="initial">
<SVLOBJECT>
<LONG name="CSP_PMNT_ID" val="-1"/>
<MONEY name="CSP_CEILING" amount="0.0" currency="AUD"/>
... (6 Replies)
Hello,
I am working on a part of code where I need a awk or shell script to convert the given XML file to CSV or TXT file.
There are multiple xml files and of different structure, so a single script is required for converting data.
I did find a lot of solutions in the forum but... (16 Replies)
Hello All,
I have many zipped XMLs (example file name in tgz formate - file_rec.trx.2016-01-23.000123.exc.85sesdzd45wsds5299c8f2994f7.tgz) looks following and I need to verify two numbers, they are RecordNumber and EnrolData (only sequence number, NOT hole).
for all the records, both should be... (5 Replies)
Hi All,
I have one query, I managed to run script with user inputs through command line or with 1 file.
But I need to read a txt file/xml file in which user can mention multiple sets of answers and script should run for each set till it reach the EOF.
Thanks in advance
for example, the file... (3 Replies)
Discussion started by: rv_champ
3 Replies
LEARN ABOUT OSX
catch
catch(n) Tcl Built-In Commands catch(n)
__________________________________________________________________________________________________________________________________________________NAME
catch - Evaluate script and trap exceptional returns
SYNOPSIS
catch script ?resultVarName? ?optionsVarName?
_________________________________________________________________DESCRIPTION
The catch command may be used to prevent errors from aborting command interpretation. The catch command calls the Tcl interpreter recur-
sively to execute script, and always returns without raising an error, regardless of any errors that might occur while executing script.
If script raises an error, catch will return a non-zero integer value corresponding to the exceptional return code returned by evaluation
of script. Tcl defines the normal return code from script evaluation to be zero (0), or TCL_OK. Tcl also defines four exceptional return
codes: 1 (TCL_ERROR), 2 (TCL_RETURN), 3 (TCL_BREAK), and 4 (TCL_CONTINUE). Errors during evaluation of a script are indicated by a return
code of TCL_ERROR. The other exceptional return codes are returned by the return, break, and continue commands and in other special situa-
tions as documented. Tcl packages can define new commands that return other integer values as return codes as well, and scripts that make
use of the return -code command can also have return codes other than the five defined by Tcl.
If the resultVarName argument is given, then the variable it names is set to the result of the script evaluation. When the return code
from the script is 1 (TCL_ERROR), the value stored in resultVarName is an error message. When the return code from the script is 0
(TCL_OK), the value stored in resultVarName is the value returned from script.
If the optionsVarName argument is given, then the variable it names is set to a dictionary of return options returned by evaluation of |
script. Tcl specifies two entries that are always defined in the dictionary: -code and -level. When the return code from evaluation of |
script is not TCL_RETURN, the value of the -level entry will be 0, and the value of the -code entry will be the same as the return code. |
Only when the return code is TCL_RETURN will the values of the -level and -code entries be something else, as further described in the doc- |
umentation for the return command. |
When the return code from evaluation of script is TCL_ERROR, three additional entries are defined in the dictionary of return options |
stored in optionsVarName: -errorinfo, -errorcode, and -errorline. The value of the -errorinfo entry is a formatted stack trace containing |
more information about the context in which the error happened. The formatted stack trace is meant to be read by a person. The value of |
the -errorcode entry is additional information about the error stored as a list. The -errorcode value is meant to be further processed by |
programs, and may not be particularly readable by people. The value of the -errorline entry is an integer indicating which line of script |
was being evaluated when the error occurred. The values of the -errorinfo and -errorcode entries of the most recent error are also avail- |
able as values of the global variables ::errorInfo and ::errorCode respectively. |
Tcl packages may provide commands that set other entries in the dictionary of return options, and the return command may be used by scripts |
to set return options in addition to those defined above.
EXAMPLES
The catch command may be used in an if to branch based on the success of a script.
if { [catch {open $someFile w} fid] } {
puts stderr "Could not open $someFile for writing
$fid"
exit 1
}
There are more complex examples of catch usage in the documentation for the return command.
SEE ALSO
break(n), continue(n), dict(n), error(n), return(n), tclvars(n)
KEYWORDS
catch, error
Tcl 8.5 catch(n)