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
3
votes
2 answers

XPathExpression to select from tesseract hOCR XML output

I have a file of roughly the following shape:
skiwi
  • 66,971
  • 31
  • 131
  • 216
3
votes
1 answer

How do I remove a soap envelope using JDOM and return the remainder of the XML as a String?

I have the following XML with a soap envelope as a Java String: ... I want to be able to use…
Christian
  • 6,070
  • 11
  • 53
  • 103
2
votes
2 answers

Heap space getting children with JDOM2

I'm trying to read an XML using JDOM2, I was testing on my computer and it worked without problem. The problem has started when I tried to use this program on a Windows Server 2012 because is giving an error "Heap space" when it tries to get the…
Jaume
  • 39
  • 1
  • 2
2
votes
2 answers

Java XML JDOM2 XPath - Read text value from XML attribute and element using XPath expression

The program should be allowed to read from an XML file using XPath expressions. I already started the project using JDOM2, switching to another API is unwanted. The difficulty is, that the program does not know beforehand if it has to read an…
Stefan
  • 23
  • 4
2
votes
1 answer

How to transform XML document with CDATA using JDOM2?

Source document: &< test]]> XSLT document (cdata-transformation.xslt):
Morten Nyhaug
  • 263
  • 2
  • 13
2
votes
1 answer

Insert a new element in between elements in KML using JDOM in java

I am using JDOM to create and modify a KML file. Every 5 seconds I receive the new values of latitude,longitude and time from the client application. I need to modify the existing file and add the latest values of latitude, longitude and time to it.…
gfernandes
  • 1,156
  • 3
  • 12
  • 29
2
votes
1 answer

Can we change the XML namespace variable name in JDOM?

I've an XML: I wish to change the namespace variable name from ns2 to something else say fp using JDOM. And the change should reflect all across the XML document. Is it…
Dixit Gokhale
  • 601
  • 1
  • 12
  • 32
2
votes
1 answer

How to creating a XML element by including name space information?

I am trying to create an XML element by including the name space information as its attribute. My code is as follows, Element root = new…
2
votes
1 answer

"main" java.lang.NoClassDefFoundError: org/jdom/JDOMException

I am trying to resolve this issue. Steps taken to resolve the issue: 1): I have downloaded jDOM and went to eclipse->build path-> libraries and added the jar file. 2): Went to /jre7/lib/ext and added jdom-2.0.5.jar (Which is the latest version) 3):…
Dark Knight
  • 503
  • 2
  • 12
  • 25
2
votes
1 answer

JDOM2 Namespace with prefix 'uml' has not been declared

I am trying to get an Element via the XPathExpression option from JDOM. My code looks like this: public static Element getElement(Document doc) { XPathFactory xpfac = XPathFactory.instance(); XPathExpression xp =…
Belenus
  • 33
  • 5
2
votes
1 answer

How to get proper special character from string in java?

I am setting a special character in DataModel. My DataModel public class LaunchModel implements Serializable { private List testquestionList; public LaunchModel() { testquestionList=new ArrayList(); } …
vijayk
  • 2,633
  • 14
  • 38
  • 59
2
votes
1 answer

No DOCTYPE declaration error in JDOM

My code is below Document convertDataToXML(ArrayList oMyDataCollection) { try { //get the Input template file location String sExportXMLTemplate = ""; XPathFactory xpfacFile =…
KK99
  • 1,971
  • 7
  • 31
  • 64
2
votes
2 answers

UTF-8 write xml successful

today I faced with very interesting problem. When I try to rewrite xml file. I have 3 ways to do this. And I want to know the best way and reason of problem. I. File file = new File(REAL_XML_PATH); try { FileWriter fileWriter = new…
Ray
  • 1,788
  • 7
  • 55
  • 92
2
votes
1 answer

get value of element in xml-file using JDOM

I have xml-file
Ray
  • 1,788
  • 7
  • 55
  • 92
1
vote
1 answer

Element being returned as NULL when parsing through StAX

I am trying to read a attribute of an element of a XML file and for that I am using the library jdom2 and Stax. private String readIncludeAll(String filePath) throws JDOMException, IOException, XMLStreamException { String includeAll =…
Fabio
  • 343
  • 1
  • 6
  • 17
1
2
3
10 11