Ramnarayan
Programmer
Hi,
I have a xml file which has a part of the output as below:
<SD>
<DT>
lskdjflasd
lsdajflksdjf
sldkjflsadkjf
</DT>
<DS>XSD</DS>
</SD>
<SD>
<DT>
some text
here
and
there
</DT>
<DS>P</DS>
</SD>
Now I am trying to write a piece of software that should take the text such that wherever "<DS>XSD</DS> occurs, I should be able to get the # of characters of the entire block of text including the tag content from <SD>... </SD>. Note that for the second part of <SD>...</SD> where <DS> has "P" should not be calculated!
I am unable to figure out a logic on how this should be put in a if loop!. Is there any other way? Thanks for your help!
I have a xml file which has a part of the output as below:
<SD>
<DT>
lskdjflasd
lsdajflksdjf
sldkjflsadkjf
</DT>
<DS>XSD</DS>
</SD>
<SD>
<DT>
some text
here
and
there
</DT>
<DS>P</DS>
</SD>
Now I am trying to write a piece of software that should take the text such that wherever "<DS>XSD</DS> occurs, I should be able to get the # of characters of the entire block of text including the tag content from <SD>... </SD>. Note that for the second part of <SD>...</SD> where <DS> has "P" should not be calculated!
I am unable to figure out a logic on how this should be put in a if loop!. Is there any other way? Thanks for your help!