Questions tagged [javax.xml]
78 questions
0
votes
2 answers
XSLT math:min() on list does not work while sorting does
I want to get the code for the medias node with the lowest index. The source XML looks similar to this:
-
999997
1
…
0001

maxdev
- 2,491
- 1
- 25
- 50
0
votes
2 answers
ParserConfigurationException with javax.xml.parsers on Android
I'm trying to use javax.xml.parsers on Android but I always get a ParserConfigurationException when trying to set these two features :
factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd",…

Laurent
- 1,661
- 16
- 29
0
votes
1 answer
How to create child tag using JaxB annotations?
I need to create XML export from my java models using Jaxb annotations.
What I need is the following xml in which is parent entity which contains multiple entities which should be as a child tree of…

Chintan Patel
- 729
- 3
- 14
- 31
0
votes
1 answer
XPath expression for javax.xml.xpath not working
I want to extract the contents from this website: https://it.projektwerk.com/de/projects/
e.g. I have an XPath expression: .//*[@id='content_0']/H3/A
(Note that the uppercase letters are correct, as my document-parser -> org.cyberneko.html ...…

eSKape
- 71
- 11
0
votes
2 answers
parse method in DocumentBuilder is returning an error
I am trying to use the parse method that takes an InputSource to parse a DocumentBuilder instance.
The error is:
The method parse(InputStream) in the type DocumentBuilder is not
applicable for the arguments (InputSource)
This is the code:…

Armando Xhimanki
- 115
- 1
- 11
0
votes
1 answer
Multiple elements with the same type but different name?
Is there any way to assign different names to the same type when using @XmlElements? I started off with just using @XmlElement. Did some reading and found @XmlElementWrapper and the @XmlElements but still have not been able to get my desired output.…

gonzo
- 2,103
- 1
- 15
- 27
0
votes
0 answers
How to read child nodes of a specific parent node when there are multiple parent nodes with same name
I have an XML of the following format:
test
..........
..........
..........

SuperCoder
- 262
- 1
- 3
- 13
0
votes
1 answer
how to unmarshall only the single nested element using javax.xml.bind.Unmarshaller
I have a following sample xsd

Achaius
- 5,904
- 21
- 65
- 122
0
votes
0 answers
Unable to translate portuguese characters that is part of a name in XML String
I am facing trouble in translating portuguese characters that is part of a field in XML String. I am using the transform Method and also encoded with iso-8859-1 and I ended up with the following error:
javax.xml.transform.TransformerException:…

sunil gogula
- 41
- 7
0
votes
0 answers
TransformerFactory handling of CDATA using a namespace
It looks like com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl is not handling CDATA properly when using a namespace.
Consider the following example:
import javax.xml.transform.OutputKeys;
import…

Boyan
- 165
- 1
- 2
- 8
0
votes
2 answers
Why it can be bad to have a not-valid XSD?
I have a set of XSD files in my project. I tried to validate them using the code, suggested in this question:
Validating XSD itself
It turned out, that some of my XSD files are not valid.
This doesn't prevent me from validating some XML with this…

MiamiBeach
- 3,261
- 6
- 28
- 54
0
votes
2 answers
Source to ByteSource
The API I'm working with takes in a com.google.common.io.ByteSource. My API takes in a javax.xml.transform.Source since I'm doing Schema validation as well as calling the other API. Is there a clean way to convert from a Source to a ByteSource…

Joe W
- 1,789
- 3
- 28
- 42
0
votes
2 answers
JAXB removing unnecessary nested XML tag
Currently I have following output from my program:

Greg Witczak
- 1,634
- 4
- 27
- 56
0
votes
0 answers
Tika or JAXP or both
Please refer the background thread for better understanding of my dilemma ;)
As mentioned in the above thread, I decided to use Tika to have a generic interface to parse docs. and extract the content. Now to do this, I have decided to convert each…

Kaliyug Antagonist
- 3,512
- 9
- 51
- 103
0
votes
1 answer
How to add prefix to the child elements of SOAP client?
I need to write a SOAP client to send a request message, I could successfully send the request but I need to amend the message, the only required modification is to add prefix to the child elements.
Once I've used the following code but nothing…

Jack
- 6,430
- 27
- 80
- 151