Ramnarayan
Programmer
Hi,
I am trying to parse a file that has multiple lines in a xml format. Now I have to find out if a line is starting with a tag like <B> or <I>. If the number of characters i.e. alpha numeric, puctuation, spaces starting from <B> is more than 50 characters, I have to output the line to a file not having the <B>.
For example:
<B>this is a test; and cannot exceed more than 50 characters</B>. But this line has more than 50 characters.
OUTPUT:
this is a test; and cannot exceed more than 50 characters. But this line has more than 50 characters.
In above example, the first case, has more than 50 characters in the tag <B> ...</B>. So can someone guide on how the coding should be done interms of a function?
I am trying to parse a file that has multiple lines in a xml format. Now I have to find out if a line is starting with a tag like <B> or <I>. If the number of characters i.e. alpha numeric, puctuation, spaces starting from <B> is more than 50 characters, I have to output the line to a file not having the <B>.
For example:
<B>this is a test; and cannot exceed more than 50 characters</B>. But this line has more than 50 characters.
OUTPUT:
this is a test; and cannot exceed more than 50 characters. But this line has more than 50 characters.
In above example, the first case, has more than 50 characters in the tag <B> ...</B>. So can someone guide on how the coding should be done interms of a function?