Questions tagged [jaxp]

The Java API for XML Processing (JAXP) enables applications to parse, transform, validate and query XML documents using an API that is independent of a particular XML processor implementation.

The Java API for XML Processing (JAXP) enables applications to parse, transform, validate and query XML documents using an API that is independent of a particular XML processor implementation.

JAXP provides a pluggability layer to enable vendors to provide their own implementations without introducing dependencies in application code. Using this software, application and tool developers can build fully-functional XML-enabled Java applications for e-commerce, application integration, and web publishing.

JAXP is a standard component in the Java platform. An implementation of the JAXP 1.3 is included in J2SE 5.0 and an implementation of JAXP 1.4 is in Java SE 6.0 and OpenJDK7. JAXP 1.4 is a maintenance release of JAXP 1.3 with support for the Streaming API for XML (StAX).

External links:

215 questions
0
votes
0 answers

Reading a DOM via StAX XmlEventReader

I have a situation where I am handed a DOM Document and I need to feed that through a process which uses StAX as part of JAXB binding. So I tried the natural thing and tried wrapping the Document as a javax.xml.transform.dom.DOMSource and passing…
Steve Ebersole
  • 9,339
  • 2
  • 48
  • 46
0
votes
1 answer

java jaxb fatal validation error using namespace extensions

I have a base XML schema that I have to extend using xs:redefine, and then add some extensions to from a second schema. When unmarshalling im getting a fatal error: cvc-complex-type.2.4.d: Invalid content was found starting with element…
The Shoe Shiner
  • 697
  • 4
  • 20
0
votes
2 answers

JAXB serializer from java objects to xml

I'm a newbie of XML programming, I'm trying to write some java objects to a well formed and valid XML file (with respect to a DTD file), I found out that I can do this kind of things using JAXP with Java. My application is going to retrieve some…
Ivano
  • 91
  • 1
  • 11
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
0 answers

Weblogic10.3 with JDK7: Use of the extension function is not allowed when the secure processing feature is set to true

We are using Weblogic10.3. After upgrading to JDK7 (JDK1.7.0_u67), we are encountering the problem like below when parsing response from a third party Web site. We have set jaxp.proeprties file under /jre/lib folder with the following…
qwang
  • 1
0
votes
1 answer

How does jaxp internal classes work?

I have a very basic doubt. Please help me understand the following lines from this link http://docs.oracle.com/javase/1.5.0/docs/guide/xml/jaxp/JAXP-Compatibility_150.html "The solution in the JAXP 1.3 reference name is to change the package names…
0
votes
1 answer

XSLT for dynamic tag passed from Java Program

My requirement is to do a XML A to XML B transformation. The Tag in which I read from XML A should be configurable, it is a kind of iteartion of lists. If there is any new tag present in XML A, it should be dealt by adding entries in configuration…
Benny R
  • 9
  • 3
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

JAXP. How to get key by keyref value

I have xml file like this: Where CourseTitle in Course tag is key. CourseTitle in Student is keyref. How can I parse this XML document and get Student's course with all…
user3435425
  • 192
  • 1
  • 18
0
votes
0 answers

Generating multiple output files in just one xslt-run using JaxP-Transformer?

I wonder if it's possible to generate multiple output files at the same time (during the same transformation run) using a JaxP-Transformer from just one input file. I have a use-case where I get a huge model file from which multiple java interfaces…
shillner
  • 1,806
  • 15
  • 24
0
votes
2 answers

Unable to find a factory for http://www.w3.org/2001/XMLSchema

I'm having some annoying problems with the following code, that worked okay until switched to Java 1.7 import javax.xml.validation.SchemaFactory; SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); Running from…
Alex
  • 2,213
  • 4
  • 32
  • 44
0
votes
1 answer

JAXP pipeline ignores xsl:comment's (using Saxon HE 9.5.1-4)

When using JAXP pipelin (using Saxon HE), the comments created with don't appear in the resulted .xml. First I set the system properties to get info and use Saxon and define the input/output: System.setProperty("jaxp.debug",…
user1971430
  • 77
  • 1
  • 8
0
votes
2 answers

Restrict tag insertion in XML

My question is related to Java. I have an xml which is initially valid as per xsd, I have used DOM parser and got a Document object out of it (I am using JAXP). Now, I want to disallow insertion of invalid xml element. So, when I try doing something…
OKOK
  • 259
  • 2
  • 16
0
votes
0 answers

jaxb to xml without namespaces

I have jaxb objects from xsd and want to generate xml with this code: StringWriter strWriter = new StringWriter(); try { JAXBContext jc = JAXBContext.newInstance(Constante.getInstance().getString("JAXB_CONTEXT_PATH")); …
user3241039
  • 23
  • 1
  • 5
0
votes
0 answers

Transform xml with data from different sources to another xml using java

I have an xml file in which some elements contain certain values.For example: I have an excel sheet containing…
rahulserver
  • 10,411
  • 24
  • 90
  • 164