Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

parsing a description tag of an xml in java

 
ufuk garip
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to parse this tag while ı debugging ı can get all of it but when ı run, ı cant get this part "Beyoğlu'nda şiddetli yağış sokakları göle çevirdi. Vatandaşlar ve araçlar aniden bastıran yağmur nedeniyle ilerlemekte zorlandı. "
of it.
Can anyone help me please!!!

<description><a href="http://www.hurriyet.com.tr/gundem/26930931.asp"><img src="http://img.hurriyet.com.tr/_np/8767/25428767.jpg" alt="Bakan Yazıcı: Yağmuru zevkle izledim" align="left" style="padding-right:5px;" border="0" width="80" height="80" /></a>Beyoğlu'nda şiddetli yağış sokakları göle çevirdi. Vatandaşlar ve araçlar aniden bastıran yağmur nedeniyle ilerlemekte zorlandı.</description>
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13061
6
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am going to take a SWAG *scientific wild ass guess" that you are parsing with SAX.

In SAX parsing, the characters() method can get called once or many times with content from a Text node. It is up to you the programmer to accumulate characters until the end of the node is reached.

The symptom of not doing this correctly is exactly what you see.

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic