determin charact charact tag charact read tag pass method order param ch charact test end tag tag ch ch tag current tag set length ch tag tag current tag tag equal end tag todo strictli correct cover deal us real xml parser better look xml document just singl root element current tag current tag length tag start tag tag index tag index tag current tag append ch 