I've not seen this issue. Do you have a character encoding switch or
miss somewhere?

Also, doesn't asCharacters have some depth to it? Is there an overload
or property at play here?

"XMLEvent.asCharacters()

The asCharacters() method return a java.xml.stream.Characters object.
>From this object you can obtain the characters themselves, as well as
see if the characters are CDATA, white space, or ignorable white
space."

∞ Andy Badera
∞ +1 518-641-1280 Google Voice
∞ This email is: [ ] bloggable [x] ask first [ ] private
∞ Google me: http://www.google.com/search?q=andrew%20badera



On Tue, Nov 10, 2009 at 9:10 PM, pipigu85 <pipig...@gmail.com> wrote:
>
> Hi, I am currently using the twitter search api to retrieve tweets but
> some of the tweets returned are not fully formed. I followed the link
> to the actual tweet itself and it seems that when it comes across
> tweets with  " " , it gets cut off
>
> Example: Actual tweet: Just Voted " I am voting for something"
>               Result that i see: Just Voted
>
> Is there anyway to retrieve the full tweet? I am using Eclipse, Java
> to do. Thanks!
>
> This is how i retrieve the search result:
>
> XMLInputFactory inputFactory = XMLInputFactory.newInstance();
>            InputStream in = new URL("http://search.twitter.com/
> search.atom?q=" + search + "&page=1&rpp=100").openStream();
>
>            XMLEventReader eventReader =
> inputFactory.createXMLEventReader(in);
>                     boolean inEntry = false;
>            Item currentItem = null;
>
>            while (eventReader.hasNext()) {
>               XMLEvent event = eventReader.nextEvent();
>
>               System.out.println(event);
>               if (event.isStartElement()) {
>                   StartElement startElement = event.asStartElement();
>                                     if (event.asStartElement().getName
> ().getLocalPart().equals("title")) {
>                           event = eventReader.nextEvent();
>                           String title = event.asCharacters().getData();
>                           if (!inEntry) {
>                                   channel.setTitle(title);//false
>                           } else {
>                                   currentItem.setTitle(title);//true
>                           }
>
>                       continue;
>                   }
>

Reply via email to