Diogo

Diogo

  • NA
  • 5
  • 0

Divide into parts a text or stream

May 5 2008 10:42 AM
I want to divide into parts a stream, a text. I explain: I have a xml file, desire that it be uploaded to stream (already done) but now I want to divide into parts when the tag <product> appears AND save to variables or an array:

<product>
<a001>200702060470023090</a001>
<a002>03</a002>
<productidentifier>
<b221>02</b221>
<b244>0470023090</b244>
</productidentifier>
</product>
<product>
<othertext>
<d102>18</d102>
<d103>02</d103>
</othertext>
</product>


In this case two parts but the entire xml file has much more!

I tried: string[] producto = str.Split('<product>');
But error... :-(

Thanks in advanced!

Answers (1)