Questions tagged [apache-commons-digester]

Digester reads XML and triggers actions called rules when certain constructs are recognized. It is commonly used to read XML configuration files to initialize Java objects.

Digester reads XML and triggers actions called rules when certain constructs are recognized. It is commonly used to read XML configuration files to initialize Java objects.

75 questions
12
votes
3 answers

When and why would you use Apache commons-digester?

Out of all the libraries for inputing and outputting xml with java, in which circumstances is commons-digester the tool of choice?
carrier
  • 32,209
  • 23
  • 76
  • 99
4
votes
5 answers

Parse a map in digester

I have a string of XML as 1 40 2 60
Azfar
  • 317
  • 1
  • 4
  • 14
4
votes
1 answer

Digester 3 calls constructors twice when creating objects

There is a strange behavior in Digester that I cannot wrap my head around. I have the following code that call the "Role" object's constructor whenever it encounter the "roles/role" node in the input xml: AbstractRulesModule loader = (new…
defoo
  • 5,159
  • 11
  • 34
  • 39
4
votes
3 answers

Struts2 & Tiles: When apache.org is down my webapp fails to start

I am building a Struts2 web application which uses tiles however I have discovered a quite frustrating problem where if apache.org is down (which seems to happen quite regularly) the web application fails to start. This is because in its standard…
3urdoch
  • 7,192
  • 8
  • 42
  • 58
3
votes
1 answer

Alternate for DigesterLoader.createDigester(url) in digester3

To be precise my question would be what is the alternate method for Digester.createLoader(url) in new Digester3? commons-digester:1.8.1 code URL url; ClassLoader curClassLoader = this.getClass().getClassLoader(); url =…
Praveen Kumar Mekala
  • 628
  • 1
  • 10
  • 26
3
votes
3 answers

Use Jakarta Digester or JAXB?

Given a scenario: I have my own system's object structure. Now there are more than one XML sources I have to map to my java classes. And there is no need to convert Java object back into XML. What's your suggestion for me to use Digester or JAXB?…
Matt
  • 1,671
  • 5
  • 23
  • 34
2
votes
1 answer

Digester rules for a string list

I have an xml doc that looks something like this: 1000 warning1 warning2 My object looks like this: public class Response { private BigDecimal total; private…
Andres Olarte
  • 4,380
  • 3
  • 24
  • 45
2
votes
4 answers

Digester: The element type "user" must be terminated by the matching end-tag ""

I'm using Digester to parse a xml file and I get the following error: May 3, 2011 6:41:25 PM org.apache.commons.digester.Digester fatalError SEVERE: Parse Fatal Error at line 2336608 column 3: The element type "user" must be terminated by the…
aneuryzm
  • 63,052
  • 100
  • 273
  • 488
2
votes
2 answers

Java, java.lang.reflect.InvocationTargetException with Digester parser

I've a Java app, working with Lucene and Apache commons Digester to parse a xml collection. After the first item is parsed, I get this error... What does it mean ? Feb 24, 2011 5:53:16 PM org.apache.commons.digester.Digester endElement SEVERE: End…
aneuryzm
  • 63,052
  • 100
  • 273
  • 488
2
votes
2 answers

How can I call a method with popped object using commons-digester?

I have an XML document that looks like this: I'd like the element to create a java.util.Map object and have each element create an…
Christopher Schultz
  • 20,221
  • 9
  • 60
  • 77
2
votes
3 answers

Locating Specific Attributes in Digester - Java

I'm using the Apache Commons Digester and trying to locate a particular tag in the structure to include in the object. some url some url some url
smith324
  • 13,020
  • 9
  • 37
  • 58
2
votes
1 answer

Apache Digester XML parser annotations and composite model

I have a following XML document which I'm going to parse into an object model with Apache Digester parser(via Digester annotations): Antivirus software for Windows
alexanoid
  • 24,051
  • 54
  • 210
  • 410
2
votes
1 answer

How to not log Digester?

I am new to this forum. At first glance this community looks awesome. I have an easy question. I am logging with log4j and am new to tomcat. I have found the file where the log rules are set, filename: server.log4j-console.properties I use for it to…
OakvilleWork
  • 2,377
  • 5
  • 25
  • 37
2
votes
2 answers

android with commons-digester java.lang.UnsupportedOperationException: This parser does not support specification "Unknown" version "0.0"

I have to use commons-digester.jar for processing xml files in android actually this was open source program that uses commons-digester.jar for xml processing in Java and I need to change it to support Android but this error happens…
2
votes
1 answer

Apache Digester Exception: Property ... can't be set

I have a problem with Apache Digester 3.2 I hope you can help me with: The XML I have to parse contains the following lines (and much more):
Cemron
  • 1,443
  • 1
  • 12
  • 15
1
2 3 4 5