Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - parse start before download XML

parse start before download XML

Put your problem here if it does not fit any of the other categories.

parse start before download XML

Postby FrunK » Sun Nov 07, 2010 8:34 am

Hi guys,

I'm trying to parse a XML file from an URL, I used the code from one of plusminus tutorials.
The XML always show the same number of items and the tag's are well formed.

The problem is that I had a less number of items than expected (can change when restarting the app). I see that the SAX start to parse an truncanted XML. I save and upload it to
another server and I get more items but not all, If I restart the app and parse again this save version, then I can got different numbers of item :S

I think is because server time response, but I dont know how start to parse just when the whole XML is load.



Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. /* Get a SAXParser from the SAXPArserFactory. */
  2.                                 SAXParserFactory spf = SAXParserFactory.newInstance();
  3.                                 SAXParser sp = spf.newSAXParser();
  4.  
  5.                                 /* Get the XMLReader of the SAXParser we created. */
  6.                                 XMLReader xr = sp.getXMLReader();
  7.                                 xr.setContentHandler(myExampleHandler);
  8.                                                                                
  9.                                 xr.parse(new InputSource(url.openStream()));
  10.                                
  11.  
Parsed in 0.013 seconds, using GeSHi 1.0.8.4
FrunK
Freshman
Freshman
 
Posts: 2
Joined: Sun Nov 07, 2010 2:13 am

Top

Re: parse start before download XML

Postby techkanika » Mon Nov 08, 2010 11:36 am

Hi FrunK..

look at the following link.. hope it will help you..

http://developerspoint.wordpress.com/2008/06/23/parsing-xml-in-java-using-sax/

Thanks
Kanika
Thanks
Kanika Rakheja
User avatar
techkanika
Experienced Developer
Experienced Developer
 
Posts: 83
Joined: Fri May 28, 2010 7:49 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 15 guests