Hi
I am trying to column count and match in tgroup cols value
in XML
file (through perl). if column count and tgroup cols value
is
mismatch, its showing error. I have a huge xml file. thats
why i was
not added here. I want to catch if tgroup cols="3"
colspace(column)
should be 3. If colspace should be 4 then showing parse
error.
My xml
--------------
<tgroup cols="3">
<colspec colnum="1"
colname="col1"/>
<colspec colnum="2"
colname="col2"/>
<colspec colnum="3"
colname="col3"/>
<tbody>
My pl file
----------
$tmp=0;
print "Enter the filename: ";
chomp($ram=<STDIN>);
open(RED,"$ram.xml");
open(MAD,">$ram.err");
print "WAIT! CHECKING IS IN PROGRESS .....
.....n";
$cols=0;
while(<RED>)
{
$cou++;
if(/[.,:;!]</title>/)
{
print MAD "LINE No. $cou: Trailing punctuations found
before
</title>
n";
}
if(/[.,:;?!]</mono>/)
{
print MAD "LINE No. $cou: Trailing punctuations found
before </mono>
n";
}
}
close(RED);
close(MAD);
I am confused how define tgroup cols value and count in
colspace(column) then it is not matching in tgroup cols
value, should
be showing error msg. Value is not constant. Because so many
tables
in XML files. All tables column is different. If table is 5
column,
tgroup cols="5".
Anyone some advice me.
Byomokesh
------------------------ Yahoo! Groups Sponsor
--------------------~-->
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/4It09A/fOaOAA/yQLSAA/ndFolB/TM
------------------------------------------------------------
--------~->
Unsubscribing info is here: h
ttp://help.yahoo.com/help/us/groups/groups-32.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://g
roups.yahoo.com/group/perl-beginner/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http
://groups.yahoo.com/group/perl-beginner/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:perl-beginner-digest@yahoogroups.com
mailto:perl-beginner-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
perl-beginner-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.c
om/info/terms/
|