Questions tagged [saxparser]

SAX (Simple API for XML) is an event-based parser for XML documents.

SAX is an alternative model to DOM for processing XML documents. Where DOM works on the document as a whole, SAX works piece by piece.

935 questions
0
votes
3 answers

how i can modify xml field value by sax parser

hi i am very new to Xml parsing i want to change following attribute values frequently ........... columnCount, width and height After that i need to rewrite xml file with modified data in following xml file by using java(sax ,Dom or jaxB parser)…
venkat
  • 11
  • 1
  • 5
0
votes
1 answer

XML SAX parsing not working in android 4.0 but in 2.x

I am using XML sax parsing for getting data through web-services. It working fine in 2.2 and 2.3 but not in higher versions like 4.x(ICS). Here my code is... btnlogin.setOnClickListener(new OnClickListener() { public void onClick(View…
0
votes
1 answer

Fatal error when parsing in an asynchronous thread (AsyncTask.doInBackground())

I ran into a problem when trying to parse XML from a URL in the method doInBackground of class AsyncTask. What is most interesting before it worked but after some of my changes (now parses the link). I checked - the link nourish correct XML. The…
Siruk Viktor
  • 504
  • 1
  • 8
  • 30
0
votes
1 answer

Do I have to create a new instance of fileinputstream if the file is changed constantly?

I have a xml log that is modified constantly by another application; however my Java code runs concurrently and checks for a couple of strings. I am using a SAX Parser. Now my question is will I have to have a new instance of a FileInputStream every…
jlisam13
  • 93
  • 10
0
votes
2 answers

How to parse XML file using SAXParser and convert it to Nodelists using Java

I am new to SAXParser, so please forgive me. How can I parse any XML file and convert it to List? Below is the structure of class XNode: class XNode{ private String nodeName; private String nodeValue; private List
user1373028
  • 39
  • 1
  • 6
0
votes
1 answer

issue in parsing the xml base webservice using sax parser in android

I have developed simple webservice base math app in which I use the XML base service and use sax parser to parse the webservice response. I already parse the XML base webservice using sax parser but my problem is when I parse this not get the whole…
Zala Janaksinh
  • 2,929
  • 5
  • 32
  • 58
0
votes
1 answer

SAXParser unable to parse attribute containing <> tag

I have an XML defined something like this. My SAXParser is unable to parse this XML as it contains <> tag in its attribute. Anyway to solves this? I tried an online syntax checker and it failed. So does…
humansg
  • 735
  • 3
  • 12
  • 30
0
votes
3 answers

How can I parse such a document?

I have a problem, and it would be very kind if someone could help me out :) I am trying to parse this XML file: foo foo
Ahmad
  • 69,608
  • 17
  • 111
  • 137
0
votes
3 answers

Issue with SAXparser

I've implemented a SAXparser in my application which has worked fine previously but i'm having problems with a new XML document. This is my parser public List
getLatestArticles(String feedUrl) { URL url = null; try { …
Andy
  • 45
  • 5
0
votes
1 answer

Why is Sax Parser not finding any elements?

I am having a heck of a time debugging the Android Sax wrapper classes. My question is 2 fold. 1. How do you debug using the Android Sax wrapper classes? 2. What am I doing wrong here? I have a basic RSS reader that works fine. I am trying to…
Michael Stoner
  • 1,341
  • 1
  • 14
  • 27
0
votes
2 answers

Android SAXParser Leftovers

I have an Android app that parses XML using SAXParser. Everything goes ok, excepting some texts that get duplicated and trimmed. For example: "Just do it, even if you do not know how!" becomes " not know how!" This is the DefaultHandler code.…
gabi906
  • 374
  • 1
  • 4
  • 15
0
votes
0 answers

DocumentBuilder removes \n and \t while parsing the xml

Possible Duplicate: How to keep whitespace before document element when parsing with Java? I'm trying to parse the xml so that i can replace the latin characters. latin characters within the xml is getting replaced, but \n and \t present within…
nithin
  • 387
  • 3
  • 9
  • 20
0
votes
2 answers

Specific multiple SAXParserFactory implementations in one web application

I have a web application on tomcat. The application needs two SAXParserFactory implements: one is JDK default implement com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl, the other one is from xerces:…
卢声远 Shengyuan Lu
  • 31,208
  • 22
  • 85
  • 130
0
votes
1 answer

How to get HTML value within a XML, Android

Hello i know this is a current problem Take a look at this, i can't find what i'm doing wrong : here is my XML : Margherita Single cheese…
Damien Locque
  • 1,810
  • 2
  • 20
  • 42
0
votes
1 answer

reach xml from servlet

Trying to write from a servlet to a local xml file located within the project. When the same code is running from another java class, no error occurs but when the code is running form the servlet, I get the following…