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

Eclipse shows errors when i write information in xml file

I use the JDOM library. When I write information into an xml file, Eclipse shows errors. The system cannot find the path specified. I try to create the file in the "language" folder. How can I create the folder automatically when I write info into…
veinhorn
  • 2,363
  • 6
  • 21
  • 33
0
votes
1 answer

how to evaluate a xpath without considing the empty Text node using JDom2

For an xml segment: Price: $11.85 when I evaluate the…
radium
  • 11
  • 1
0
votes
1 answer

How to export JTree data as XML file by using JDOM

I have a jtree and need to save each child level element save as xml, I tried to using below code to implement it, but it gives errors for converting numeric data of the xml document, Error message : Exception in thread "AWT-EventQueue-0"…
0
votes
1 answer

how to get value of CDATA in JDOM2

I am trying to retrieve CDATA value in JDOM2 using getText() but I only get the following - My XML looks like below

SOMECONTENT]]>

the CDATA…
KK99
  • 1,971
  • 7
  • 31
  • 64
0
votes
0 answers

how to remove selected jtree from several jtrees by right clicking on

In my GUI I have to load several XML files according to JTree structure one by one, If I want to edit or remove a complete JTree or value by right clicking on, how can I do that efficiently? any clue? I process xml file to jtree as below, …
0
votes
1 answer

jdom2 and reading xml string not file from URI

How can I read a raw XML string into jdom2 for manipulation? Everything I am finding on the web is to load a file from a url.
Mike Flynn
  • 22,342
  • 54
  • 182
  • 341
0
votes
1 answer

Check If String Is Valid XML with Jdom2

What is the best way to check if a string is valid XML for Jdom2?
Mike Flynn
  • 22,342
  • 54
  • 182
  • 341
0
votes
1 answer

Add invalid xml elements to xml document java

I have the following code: Document mainContent = new Document(); Element rootElement = new Element("html"); mainContent.setContent(rootElement); Element headElement = new Element("head"); Element metaElement = new…
Dejell
  • 13,947
  • 40
  • 146
  • 229
0
votes
1 answer

JDOM2 and xmlns attribute

I'm generating sitemaps and their index with JDOM2. what I'd like to obtain is this: http:// so I added an attribute to the root element titled "xmlns". Running the…
0
votes
1 answer

NullPointerException in saxon IdentityTransformer.transform when extracting data from javax DOMSource

I am using Spring Webservice (2.1.0) Client to send a very simple Message to a Soap UI Mock Webservice. (Hello World style, no namespaces) Before Sending the DOMSource via the SpringWebserviceTemplate it is extracted from a jdom2.Element as…
elfwyn
  • 568
  • 2
  • 11
  • 33
0
votes
1 answer

edit content xml file use JDOM2

I want to ask your advice in next situation. I have xml file with goods. Goods can be not in stock ( in this case I use empty-tag) or in stock (in this case I use tag value_price and dont use tag ). I…
Ray
  • 1,788
  • 7
  • 55
  • 92
0
votes
2 answers

Ivy cannot resolve maven-cobertura-plugin

I am using Ivy for dependency managment. I have problems with maven-findbgs-plugin:plugin:1.3.1 maven-cobertura-plugin:plugin:1.3 There were several topics on SO about this:e.g. Maven Dependencies can't be resolved The answer is to…
-1
votes
1 answer

Parsing xml files with JDK SAX parser with character # in containing folder always fails

see subject. This was executed on a file with the following path (on Mac OSX): /Volumes/RobExtL/xmltests/hurz#1/hurz.xml This is a valid path. The message indicates that the JDK parser somehow cannot deal with the "#" in the filename and cuts…
user1573546
  • 523
  • 5
  • 13
-1
votes
1 answer

How to get the content of an Element (CDATA) while preserving line breaks?

I tried to get the content of an Element which has only a CDATA section. Inside the CDATA are multiple lines of text. However when I try element.getValue() .getText() or .getTextTrim() they all strip the line breaks out. I need to get a String that…
ycomp
  • 8,316
  • 19
  • 57
  • 95
-1
votes
1 answer

How do I correctly parse an XMI file using jdom 2?

I want to parse an XMI file using jdom2, but I can't seem to get information from it. Here's an example: element.getAttributes() -> [[Attribute: xsi:type="coremodel:Place"],[Attribute: id="p_InitialNode1"], [Attribute:…
abdozmeir
  • 11
  • 2
1 2 3
10
11