Questions tagged [dom4j]

dom4j is an open source library for working with XML, XPath and XSLT on the Java platform using the Java Collections Framework and with full support for DOM, SAX and JAXP.

dom4j is an open source library for working with XML, XPath and XSLT on the Java platform using the Java Collections Framework and with full support for DOM, SAX and JAXP.

Features:

  • designed for the Java platform with full support for the Java Collections Framework (Java 2 Collections)
  • full support for JAXP, TrAX, SAX, DOM, and XSLT
  • fully integrated XPath support for easy navigation of XML documents
  • event based proccessing mode to support for massive documents or XML streams based on Java interfaces for flexible plug and play implementations
  • support for XML Schema Data Type support using Kohsuke Kawaguchi's excellent Multi Schema Validator library
323 questions
0
votes
1 answer

dom4j - cant get cdata from xml

I have question how can I get cdata from xml? So my xml looks like this: I tried to get word by getText(), getStringValue() but they return me empty string ;/ Any idea what should i do?
Mariola
  • 249
  • 7
  • 16
0
votes
2 answers

dom4j maven missing artifact

I'm having a problem with dom4j in pom.xml. org.dom4j dom4j-1.4 1.4 jar compile is annotated with "Missing…
jaros
  • 323
  • 1
  • 3
  • 15
0
votes
1 answer

Filling an ArrayList> with content of XML using dom4j

I'm having some trouble filling my ArrayList> can you help me? I have the following XML file 1 1
SaintLike
  • 9,119
  • 11
  • 39
  • 69
0
votes
2 answers

Adding XML sub elements to an ArrayList with DOM4J

here's a sample of my XML file: int string int string I've never worked with DOM4J and I've read the…
SaintLike
  • 9,119
  • 11
  • 39
  • 69
0
votes
2 answers

Classpath is not working

I got source code from Hermes (hermes2_src_20100121). When I extracted it has about 10 folders which is separate projects. /myd1/Exetel/Hermes_SRC/ebxml-pkg /myd1/Exetel/Hermes_SRC/CorvusEbMS /myd1/Exetel/Hermes_SRC/Commons Etc…. Each project has…
0
votes
3 answers

Java XML Reading an XML file from top to bottom

I want to read an XML starting from the top to the bottom using Java. However, I don't want to use recursive functions because I want to be able to jump to a different element and start reading from that position. I've tried using getParent() and…
Mingwei Samuel
  • 2,917
  • 1
  • 30
  • 40
0
votes
1 answer

Populating JComboBox with XML attribute - DOM4J

I was trying to use DOM4J API to populate a JComboBox with a XML file attributes, but I don't know how it's done. I've been reading the API documentation but I still can't do it. Can you help me? Here's a sample of my XML file:
SaintLike
  • 9,119
  • 11
  • 39
  • 69
0
votes
1 answer

DOM4j doesn't work on Android

I try to use DOM4j to phase a XML RSS feed on Android. I do add the dom4j.jar to lib\ and the user permission. I also compile this source code in pure Java project, and it works! I'm…
Dan
  • 301
  • 3
  • 21
0
votes
1 answer

Handling compressed XML documents with dom4j

Specifically, I was using dom4j to read in KML documents and parsing out some of the data in the XML. When I just pass in the URL in string form to the reader, it's so simple and handles both file system URLs and web URLs: SAXReader reader = new…
Bal
  • 2,027
  • 4
  • 25
  • 51
0
votes
1 answer

Dom4j: Node implementation incompatibility

Dom4j is obviously an awesome project, it hasn't been touched since 2005, yet it's still widely used. However, the incompatibility of the Node implementations causes me some issues. There are name clashes between org.dom4j, org.w3c.dom, and other,…
Ondra Žižka
  • 43,948
  • 41
  • 217
  • 277
0
votes
1 answer

setting namespace true while parsing in dom4j

I am parsing one xml document using dom4j as below SAXReader reader = new SAXReader(); document = reader.read("C:/test.xml"); But it does not keep the namespaces that were there when i write the xml as below FileOutputStream fos…
user1487454
  • 41
  • 1
  • 6
0
votes
1 answer

Parsing response.getEntity(String.class) string to xml with DocumentHelper.parseText() in dom4j

dom4j has no trouble doing String text = " James "; Document document = DocumentHelper.parseText(text); What I need is this String text = ""+ "
kasavbere
  • 5,873
  • 14
  • 49
  • 72
0
votes
1 answer

Incorrect encoding in xml element using dom4j with Spring MVC

I've created an AbstractView in order to output some XML to the browser, as follows: public abstract class AbstractXmlView extends AbstractView { public AbstractXmlView() { setContentType("application/xml"); } @Override protected void…
Joaquín L. Robles
  • 6,261
  • 10
  • 66
  • 96
0
votes
1 answer

DOM4J validate xml against DTD provided at runtime

I need to validate a multiple files produced by a third party against a DTD; The files don't have dtd declaration and I can't change this because I am not the owner, Is there a way of validating them using dom4j by providing the DTD…
John Stadt
  • 500
  • 7
  • 17
0
votes
2 answers

select nodes from a selection of nodes

I've got a large XML file I'm parsing. My first selectNodes statement gets me a list of all elements I want to parse through. For each element returned by the first selectNodes statement, I want to run another selectNodes. The XML might look like…
Rubber Duck
  • 2,997
  • 2
  • 20
  • 25