Sponsored Content
Top Forums Programming How to write a java program that will parse through an XML file and generate a report? Post 302904279 by risarose87 on Tuesday 3rd of June 2014 09:05:44 AM
Old 06-03-2014
I'm trying to write a java program that will read and parse through an xml file using java. I need it to get me a each group of batch numbers(so say there are 3 batches, I need it broken down so each batch has it's total of items pertaining to that group with a total amount of payment for that group) once all the groups have been printed with the amount of items and payments it needs to get the total number of items along with a grand total of payments. This will all be written in java.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to parse a XML file using PERL and XML::DOm

I need to know the way. I have got parsing down some nodes. But I was unable to get the child node perfectly. If you have code please send it. It will be very useful for me. (0 Replies)
Discussion started by: girigopal
0 Replies

2. Shell Programming and Scripting

Parse XML file

Hi, I need to parse the following XML data enclosed in <a> </a> XML tag using shell script. <X> ..... </X> <a> <b> <c>data1</c> <c>data2</c> </b> <d> <c>data3</c> </d> </a> <XX> ... </XX> (5 Replies)
Discussion started by: viki
5 Replies

3. Programming

Generate XML file from C++

Hi, I need to generate an XML file as output for a C++ program. Immediate idea that came across to me was through fprintf by mentioning all the attribute names/fields in the XML file one by one and inserting the values there which I get from C++ program. Is there any other better way to... (2 Replies)
Discussion started by: debu
2 Replies

4. Emergency UNIX and Linux Support

How to parse the following xml file

Hi, I have the following file Example.xml <?xml version="1.0" encoding="iso-8859-1"?> <html><set label="09/07/29" value="1241.90"/> </html> Can any one help me in parsing this xml file I want to retrive the attribute values of the tag set Example I want to... (3 Replies)
Discussion started by: Raji_gadam
3 Replies

5. UNIX for Dummies Questions & Answers

Parse XML e report con AWK

Thanks in advance who can answer. I have to make a small shell that after reading an XML file and extract the fields I create a text file with the same fields taken previously in tabular form. I did this parse.awk ---------------------- BEGIN { FS="" } { for(i=2; i<=NF; i+=2) { ... (1 Reply)
Discussion started by: mcarlo65
1 Replies

6. Shell Programming and Scripting

Write an automated shell program(s) that can create, monitor the log files and report the issues for

Hi , Please help me getting this done. Write an automated shell program(s) that can create, monitor the log files and report the issues for matching pattern. (i) Conditions for creating log files. Log file is created with date (example 2010_03_27.log). If the log file size is 10 Mb for... (1 Reply)
Discussion started by: itian2010
1 Replies

7. Shell Programming and Scripting

parse xml file

Hello all, Given the following extract from a xml file with multiple <JOB> .... </JOB> entries <JOB APPLICATION="APP" APR="0" AUG="0" AUTHOR="AUT" AUTOARCH="0" CMDLINE="/tmp/test1 %%var" CONFIRM="1" CREATION_DATE="20100430" CREATION_TIME="130739" ... (2 Replies)
Discussion started by: cabrao
2 Replies

8. Shell Programming and Scripting

KSH - help needed for creating a script to generate xml file from text file

Dear Members, I have a table in Oracle DB and one of its column name is INFO which has data in text format which we need to fetch in a script and create an xml file of a new table from the input. The contents of a single cell of INFO column is like: Area:app - aam Clean Up Criteria:... (0 Replies)
Discussion started by: Yoodit
0 Replies

9. Shell Programming and Scripting

BASH script to parse XML and generate CSV

Hi All, Hope all you are doing good! Need your help. I have an XML file which needs to be converted CSV file. I am not an expert of awk/sed so your help is highly appreciated!! XML file looks like this: <l:event dateTime="2013-03-13 07:15:54.713" layerName="OSB" processName="ABC"... (2 Replies)
Discussion started by: bhaskar_m
2 Replies

10. Shell Programming and Scripting

Parse XML File.

HI Guys I have Below XML File : <xn:SubNetwork id="XYZ"> <xn:SubNetwork id="C01"> <xn:MeContext id="CO1"> <xn:ManagedElement id="1"> <un:RncFunction id="1"> <un:UtranCell id="NY431"> ... (2 Replies)
Discussion started by: pareshkp
2 Replies
BATCHER(8)						    InterNetNews Documentation							BATCHER(8)

NAME
batcher - Article batching for InterNetNews SYNOPSIS
batcher [-rv] [-a articles] [-A total-articles] [-b size] [-B total-size] [-i string] [-N batches] [-p process] [-s separator] host [input] DESCRIPTION
batcher reads a list of files and prepares news batches for the specified host. It is generally used to prepare UUCP feeds, but the resulting batches can be used by any application that uses rnews(8) to inject the articles. It is normally invoked by a script run out of cron that uses shlock to lock the host, followed by ctlinnd to flush the batch file. See send-uucp(8) for a front-end for batcher. batcher reads the file input, or standard input if no file is given. If input is a relative file name, it is assumed to be in pathoutgoing as set in inn.conf. Blank lines and lines starting with a number sign ("#") are ignored. All other lines in the input should consist of one or two fields separated by a single space. The first field is the storage API token of an article. The second field, if present, specifies the size of the article in bytes. By default, batches are written to standard output (which isn't very useful if more than one batch is output), but see the -p option. OPTIONS
-a articles This flag limits the number of articles included in each batch. The default is no limit. A new batch will be started when either the total bytes or the number of articles written exceeds the specified limits. -A total-articles Limits the total number of articles written for all batches. As soon as the total number of articles written to batches reaches or exceeds total-articles, all additional articles in the input will be deferred. The default is no limit. -b size This flag sets the size limit for each batch; as soon as at least this much data has been written out, a new batch will be started. The default size is 60 KB. Using "-b 0" will allow unlimited batch sizes. -B total-size Limits the total number of bytes written for all batches. As soon as the total bytes written to batches reaches or exceeds total-size, all additional articles in the input will be deferred. The default is no limit. -i string A batch starts with an identifying line to specify the unpacking method to be used on the receiving end. When this flag is used, string, followed by a newline, will be output at the start of each batch. The default is to have no initial string (under the assumption that either the processor specified with the -p flag or some other later process will add the appropriate line). -N batches Limits the total number of batches written. As soon as the number of batches written reaches or exceeds batches, all additional articles in the input will be deferred. The default is no limit. -p process By default, batches are written to standard output, which is not useful when more than one output batch is created. If this option is given, each batch will instead be fed via a pipe to the shell command process. The process argument must be an sprintf(3) format string, which may have a single %s parameter that will be replaced with the host name. A common value is: ( echo '#! gunbatch' ; exec gzip -c ) | uux - -r -z %s!rnews which generates gzip-compressed batches and feeds them to uux. -r By default, batcher reports errors to pathlog/errlog. To suppress this redirection and report errors to standard error, use the -r flag. -s separator Each article in a batch starts with a separator line that indicates the size of the article. separator must be an sprintf(3) string, which may have a single %ld in the string that will be replaced with the size of the article. If the separator is not empty, a newline will also be appended to it when it is added to the beginning of each article. The default separator is: #! rnews %ld and this should rarely be changed. -v Upon exit, batcher reports statistics via syslog. With this flag, the statistics will also be printed to standard output. EXIT STATUS
If the input is exhausted and all batches are created successfully, batcher will exit with a zero status. If any of the limits specified with -A, -B, or -N flags are reached, or if there is an error in writing a batch, batcher will try to spool the remaining input by copying it to a file as follows: o If there was no input filename, the remaining input will be copied to pathoutgoing/host. o If an input filename was given, the remaining input will be copied to a temporary file named by appending ".bch" to the end of input (and qualified by adding pathoutgoing if input was not a fully qualified path). If this happens successfully, batcher will then try to rename this temporary file to input (thus replacing input with a copy of itself with all of lines for the successfully batched articles removed). Upon receipt of an interrupt or termination signal, batcher will finish batching the current article, close the batch, and then rewrite the batch file as described above. HISTORY
Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. Rewritten by Russ Allbery <rra@stanford.edu> in POD. $Id: batcher.pod 8774 2009-11-15 09:23:27Z iulius $ SEE ALSO
ctlinnd(8), inn.conf(5), newsfeeds(5), rnews(8), send-uucp(8), shlock(1). INN 2.5.2 2009-11-15 BATCHER(8)
All times are GMT -4. The time now is 02:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy