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
0 answers

Validate xml document against external DTD

I need to validate external XML document against DTD, that's stored in my jar. But the problem is, that this document probably don't have
hades
  • 1,077
  • 3
  • 11
  • 19
0
votes
4 answers

java.lang.IndexOutOfBoundsException: Invalid index 11, size is 11

I am working on the sax XML parsing. Logcat error like... java.lang.IndexOutOfBoundsException: Invalid index 11, size is 11 I got the error at map.put("pubdate", sitesList.getPubdate().get(i)); for (int i = 0; i < sitesList.getName().size();…
Rahul Patel
  • 3,823
  • 5
  • 30
  • 46
0
votes
2 answers

parsing text with html tags

I have to parse an xml file from a server; I tried with DOm parser and Sax parser but I'm not able to parse html tags and it stops when it finds the first "<" This is my parser class: public class XMLParser { // constructor public…
mir
  • 1
  • 2
0
votes
1 answer

Saxparser not parsing HTML numeric character reference. question mark displayed

I am trying to Parse an xml which is containing — and ’ numeric character references. On parsing it gives me output as "?". it is not only these two, any HTML/XMl numeric character references in the xml creates this issue. only pre-defined…
0
votes
1 answer

how to do nested parsing using SAX Parser in android

I have a xml like this : http://uopnews.unipune.ac.in/Lists/Calendar/DispForm.aspx?ID=14 Location: PUMBA Auditorium - University of Pune
Start Time:
Neha
  • 245
  • 5
  • 17
0
votes
4 answers

Is It possible to parse large xml file which has size 800 MB using SAX Parser

I am parsing transxchange data which has some files of very large size nearly 800 MB. when I am trying to parse these files I am getting following error. Exception in thread "main" java.lang.OutOfMemoryError: Java heap…
Ram kiran Pachigolla
  • 20,897
  • 15
  • 57
  • 78
0
votes
3 answers

Parse XLSX files in Java without external libraries?

quick question I've been asked to create a couple of parsers for XLSX file formats. Pretty much everywhere I've read says to grab the POI libraries, however the system I am working on are very touchy about bringing on external APIs so I'd far rather…
Ally
  • 1,476
  • 3
  • 19
  • 30
0
votes
1 answer

Android SAX XML Parser with String or Stringbuilder or Stringbuffer

I have an xml that i am parsing there is a field that contains very long text, but somehow it is dropped by the parser, is it so because i am using just string to get those character to should i use string buffer or builder. What i want is to…
Programmer
  • 5,360
  • 10
  • 37
  • 61
0
votes
1 answer

SAXParser Error while trying to parse Xml from a remote server in Android

I am trying to parse xml from a remote server. My codes for 3 java programs are below: 1. BillScreen.java: package cc3012n.kalrashid; import java.net.URL; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import…
theStupidOne
  • 57
  • 2
  • 6
0
votes
1 answer

lack of xml header definition

I know that we should include as the header of xml. But if I don't include it in the xml doc like aaa What's the consequence? I've try that my java SAX parser can't parse this xml without the …
Magic
  • 1,182
  • 2
  • 18
  • 28
0
votes
1 answer

how to parse large xml file(3.8 mb) in 40 seconds from url using saxparser in android?

Iam using sax parser to parse the xml file of 3.8 mb. Its loading time while parsing is almost about 3.5 minutes. public class sentmsghandler extends DefaultHandler { public folder folderobj; public Contact contact; public Parent parent; public…
0
votes
1 answer

How to get dtd and xml file from keyboard?

I am doing some xml validation tool. So i need code how to get dtd and xml file from keyboard as argument. My code is below. Please advise me. I am newer in java. public class ValidateXML { public static void main(String args[]) { try{ File…
Rishi
  • 95
  • 2
  • 9
0
votes
1 answer

how to read duplicate nodes from XML

As you can see in the below xml there are two duplicate fields or nodes called condition (one in and the other in . so whenever i use the startelement method to read the condition I always get the last last…
Nav
  • 10,304
  • 20
  • 56
  • 83
0
votes
1 answer

how to add validation in xsd for blank spaces

i have created basic xsd successfully however I want to add restriction for the element that it should be present and contains atleast one character. it also has 4 attributes. i am facing problem in adding restriction since I can not use simple type…
Shashank K
  • 1
  • 1
  • 6
0
votes
2 answers

Convert Hashes to CSV

I have a CSV that I like to save all my hash values on it. I am using nokogiri sax to parse a xml document and then save it to a CSV. The sax parser: require 'rubygems' require 'nokogiri' require 'csv' class MyDocument <…
user592638