Registration Forgot password?
Login
Password
Remember me
Login through VKontakte
General > Articles > Large XML files processing

Large XML files processing

There was a problem of comparing a large number of XML files generated by different applications. Thus arose the problem of different formats and different sort attribute xml tags. This led to interference than as comparisons applications showed differences in format and order of attributes, and the background of thousands of such differences were difficult to find real differences between files.

To solve this problem was written instrument XMLProcessor which sweat XML file formats and file leads to one style. XMLProcessor use command line mode for batch files. After processing the files using XMLProcessor can be compared using such Araxis Merge, which will now show only real differences between files.

There was a problem processing XML files (50 megabytes) which should have cut all the elements orderitem (98% of the file contents), visual text editors for a long time working on the XML file of this size, so it was decided to improve XMLProcessor to support easy manipulation with XML files, such as adding, removing and replacing components

XMLProcessor.exe input.xml output.xml [task_file.txt] [PrettyPrint]

input.xml - mandatory parameter - path to input file

output.xml - mandatory parameter - path to output file

task_file.txt - not a mandatory parameter - path to file with the objectives

PrettyPrint - not a mandatory parameter - file format, provide for "good" source file

Example

XMLProcessor.exe test1.xml test2.xml test1.task PrettyPrint

Objectives

Supports three possible problems ADD, DEL, CHN

ADD - add xml tags before or after a tag team format "ADD condition [AFTR | BEFR] [FILE] source"

ADD - reserved word

condition - the name of xml tag before or after which the program will insert additional tag

AFTR | BEFR - mark that shows where to insert additional tag AFTR after (default) or to BEFR

FILE mark that shows that the source parameter is the file path

source - xml tag or file path to be added

DEL - remove the tag specified in the condition, also removed all the generations

CHN - tag replacement specified in condition to source

Example file problems
# ADD command - add xml tag before of after condition tag
# format ADD condition [AFTR|BEFR] [FILE] source
# ADD - reserved word
# condition - xml tag name without <> case sentisive
# AFTR|BEFR optional parameter add source before or after condition tag AFTR default
# FILE mean that source is path to xml file
# source - xml tag that must be added ot path to xml file if FILE set
ADD date world
ADD date BEFR HELLO
# DEL command - remove condition tag and all childs
# format DEL condition
DEL http_method
# CHN connamd remove condition and past source
# fomat CHN condition [FILE] source
CHN unique_id FILE test_chn.xml

Download XMLProcessor

Download source code of XMLProcessor
You can add comment on current page, or on forum page there.Post count 5.

Last comment

11.07.2016
What I find so innsreetitg is you could never find this anywhere else.
10.07.2016
That's a brilliant answer to an inieresttng question http://indocdxog.com [url=http://gtfoqmjm.com]gtfoqmjm[/url] [link=http://ccidzqf.com]ccidzqf[/link]

Name*E-mail
Code*