04-02-2013
Comparing 2 xml files and print the differences only in output
Hi....I'm having 2 xml files, one is having some special characters and another is a clean xml file does not have any special characters. Now I need one audit kind of file which will show me only from which line the special characters have been removed and the special characters.
Can you please help me on this? I have tried diff, cmm but the result is not appropriate whatever I'm looking for.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I have a column in 2 different files which i want to compare, and output the results to a different file. The columns are in different positions in those 2 files.
File 1 the column is in position 10-15
File 2 the column is in position 15-20
Please advise
Thanks (1 Reply)
Discussion started by: samit_9999
1 Replies
2. Shell Programming and Scripting
Hello Everybody!!!!!!!!! Request you to help me with the below mentioned issue:
I have 2 files say,
File 1:
a|4|7
b|3|2
c|8|8
d|8|9
File 2:
a|4|6
b|2|2
c|8|8
d|9|8
The third file(output file) should have:
Data mismatch in row 1 column 3
Data mismatch in row 2 coumn 2
Data... (3 Replies)
Discussion started by: abhijeet1409
3 Replies
3. Shell Programming and Scripting
Dear all,
I have some problem here. I want to detect the differences between two text files and count the number of differences between them.
Such as file1.txt i have : I am new in perl.
and file2.txt i have : I ma enw in pearl.
So it should return me 3 as the number of differences.
So... (2 Replies)
Discussion started by: branred
2 Replies
4. Shell Programming and Scripting
i have a file a with contents
tom
lasole
jon
gille
sam
and a file b with contents
tom|1234|abcf|newyork,ohio,oregon
sam|2345|drft|texas,london
hyle|4444|befr|wisconsin
neyo|2333|tdtt|ohio,jersey
i want to compare records in file a to file b such that when the name tom is... (5 Replies)
Discussion started by: dealerso
5 Replies
5. UNIX for Advanced & Expert Users
All,
PLease can you help me with a shell script which can compare two xml files and print the difference to a output file.
I have attached one such file for you reference.
<Group>
<Member ID=":Year_Quad:41501" childCount="4" fullPath="PEPSICO Year-Quad-Wk : FOLDER.52 Weeks Ending Dec... (2 Replies)
Discussion started by: kanthrajgowda
2 Replies
6. Shell Programming and Scripting
Hello,
I have two xml files. One master and the other temp. Each xml files are in format given below.
Sample input file lines:
ABC=5673;DEF=GHYU
Date
<input>
<class>
<blah blah>
<blah blah>
</class>
</input>
ABC=1683;DEF=DFYU
Date
<input>
<class> (1 Reply)
Discussion started by: shekhar2010us
1 Replies
7. Shell Programming and Scripting
Hi,
I'm new to perl and i have to write a perl script that will compare to log/txt files and display the differences. Unfortunately I'm not allowed to use any complied binaries or applications like diff or comm.
So far i've across a code like this:
use strict;
use warnings;
my $list1;... (2 Replies)
Discussion started by: dont_be_hasty
2 Replies
8. Shell Programming and Scripting
Hi
*
I have two text files which has the file size, timestamp and the file name. I need to compare these two files and get the differences in the output format. Can anyone help me out with this.
*
cat file1.txt
*474742 Apr 18* 2010 sample.log
*135098 Apr 18* 2010 Testfile
134282 Apr 18* 2010... (7 Replies)
Discussion started by: Sendhil.Kumaran
7 Replies
9. Shell Programming and Scripting
I have 2 files that need to be compared. Email the differences if something is different and don't email if nothing is different. One or both of the files could be empty. One or both could have data in them.
example files
backup.doc.$(date +%y%m%d) file size is 0
backup.doc.$(TZ=CST+24... (4 Replies)
Discussion started by: jabbott3
4 Replies
10. Shell Programming and Scripting
Hello All,
Requirement is to compare 2 XML files and see if there are any differences but from some of the providers We are receiving UTF-16 formatted XML file with no end of line as shown below.
Excerpt of data file:
ÿþ<^@?^@x^@m^@l^@ ^@v^@e^@r^@s^@i^@o^@n^@=^@"^@1^@.^@0^@"^@... (11 Replies)
Discussion started by: Ariean
11 Replies
LEARN ABOUT DEBIAN
stag-autoschema
STAG-AUTOSCHEMA(1p) User Contributed Perl Documentation STAG-AUTOSCHEMA(1p)
NAME
stag-autoschema - writes the implicit stag-schema for a stag file
SYNOPSIS
stag-autoschema -w sxpr sample-data.xml
stag-autoschema -dtd sample-data.xml
DESCRIPTION
Takes a stag compatible file (xml, sxpr, itext), or a file in any format plus a parser, and writes out the implicit underlying stag-schema
stag-schema should look relatively self-explanatory.
Here is an example stag-schema, shown in sxpr syntax:
(db
(person*
(name "s"
(address+
(address_type "s")
(street "s")
(street2? "s")
(city "s")
(zip? "s")))))
The database db contains zero or more persons, each person has a mandatory name and at least one address.
The cardinality mnemonics are as follows:
+ 1 or more
? 0 or one
* 0 or more
The default cardinality is 1
ARGUMENTS
-p|parser FORMAT
FORMAT is one of xml, sxpr or itext, or the name of a perl module
xml assumed as default
-dtd
exports schema as DTD
-w|writer FORMAT
FORMAT is one of xml, sxpr or itext, or the name of a perl module, OR DTD
The default is sxpr
note that stag schemas exported as xml will be invalid xml, due to the use of symbols *, +, ? in the node names
LIMITATIONS
not event based - memory usage becomes exhorbitant on large files; prepare a small sample beforehand
perl v5.10.0 2008-12-23 STAG-AUTOSCHEMA(1p)