Questions tagged [jdom-2]

JDOM 2 is the Second version of the JDOM XML API See the [Migration Guide][1] for differences over JDOM 1

JDOM 2 is the Second version of the JDOM XML API

See the Migration Guide for differences over JDOM 1

165 questions
1
vote
3 answers

JDOM removing a element from root

I am not able to remove an element from root element. Below is the example of xml
1
vote
3 answers

Convert XML-File to string without manipulation or optimization in Java

I have some trouble with the JDOM2 whitch i use to work with XML files. I want to convert the XML file to a string without any manipulation or optimization. Thats my Java code to do that: SAXBuilder builder = new SAXBuilder(); File xmlFile =…
Alucard
  • 317
  • 1
  • 3
  • 15
1
vote
1 answer

JDOM XPath Getting Inner Element without Namespace

I have an xml like this:
Eray Tuncer
  • 707
  • 2
  • 11
  • 31
1
vote
1 answer

Spring Feed Integration

i work with spring and spring-integration. I need get rss stream and write (right now is file). This is my application config for spring:
i.krivosheev
  • 387
  • 3
  • 18
1
vote
1 answer

How do I add standalone="no" TO A FILE using JDOM?

I found here how I can override the print-out of the XML document to my Eclipse console so that it includes standalone = "no", but how do I write standalone = "no" to a file? I have tried writing the same document to a file, and it still will not…
Raisintoe
  • 201
  • 1
  • 4
  • 11
1
vote
2 answers

create xml document and add or just add if document exixts

here is my code: Element FICHADAS = new Element("FICHADAS"); Document doc = new Document(FICHADAS); try{ Element fichada = new Element("fichada"); //Nº TERMINAL fichada.addContent(new…
marcss
  • 253
  • 2
  • 14
1
vote
1 answer

create xml from java using Jdom

I'm using this code to create the generatedXml.xml file Element FICHADAS = new Element("FICHADAS"); Document doc = new Document(FICHADAS); doc.setRootElement(FICHADAS); Element fichada = new Element("fichada"); fichada.addContent(new…
marcss
  • 253
  • 2
  • 14
1
vote
0 answers

Jdom 2 xpath query

I'm trying to parse the following file: ... ... ... I'm looking for gaja element without attribute feia or with…
danielgmarcos
  • 174
  • 2
  • 9
1
vote
1 answer

jdom2 xPathExpression pull node fail

I try to parse xml which look like HEARTS TEN SPADES KING
viavad
  • 373
  • 7
  • 17
1
vote
0 answers

How to transform xml using jdom2 and a xslt 2.0 stylesheet

Does anyone know what TransformerFactory I should use to transform xml using jdom2 and a XSLT 2.0 stylesheet?
R. Oosterholt
  • 7,720
  • 2
  • 53
  • 77
1
vote
2 answers

How to prevent XMLOutputter in JDOM2 from cutting attribute name (namespace-part)?

I tried to update from JDOM 1.0 to JDOM2. In JDOM 1.0 this code: DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); org.w3c.dom.Document doc = dbFactory.newDocumentBuilder().newDocument(); doc.setXmlVersion("1.0"); Element…
Roland
  • 1,220
  • 1
  • 14
  • 29
1
vote
1 answer

How to retrieve prefixed child elements using JDom

I have the following xml snippet from which I am trying to retrieve the first element using JDOM but I am getting nullpointer exception.please help me out if any one knows.
Praveen
  • 201
  • 5
  • 18
1
vote
2 answers

Jdom2 Sharepoint XML Fields

Having some trouble returning certain fields from a SharePoint List SOAP request. Here is the XML:
luskbo
  • 155
  • 3
  • 18
1
vote
1 answer

JDOM2 - Follow Redirects (HTTP Error 301)

I'm currently working on a third-party-program for a website using its public XML API. I don't want to go into deeper matters about what the program is actually doing or whatsoever because there seems to be a problem right at the beginning. The…
sep87x
  • 119
  • 9
1
vote
2 answers

How do you get the xml version of a document using org.jdom2?

I am using org.jdom2 to parse xml files. I need to know if the file is marked as version 1.1 or version 1.0. How do I access the xml declaration? Also how do I set the version when writing the output using the XMLOutputter?
Arwen Pond
  • 33
  • 1
  • 5