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
1 answer

XML DOM Creating Mixed Content

I need to insert an element in the middle of another element's text. Given here is "before" and "after" that I want Before This is content of element1 After This is content of element1…
OKOK
  • 259
  • 2
  • 16
0
votes
1 answer

How to create XML document with multiple schemas in Java?

I have XSD which describes custom schema and which imports XLink (another schema). Import is made with the following declaration ix main XSD: xlink.xsd file is…
Dims
  • 47,675
  • 117
  • 331
  • 600
0
votes
1 answer

Can't make getElementById() method working correctly in a java serializer program

I'm writing an XML serializer with JAXP. I'm receiving pseudo random data from a JAR and I'm building the DOM tree. I have to check if I already inserted the same Element into the tree; in order to perform this control I'm trying to use the…
Manuel Durando
  • 1,493
  • 3
  • 19
  • 30
0
votes
1 answer

How to avoid infinite loops in JAXP's parse()?

(Question UPDATED, see below) On Java 7, I use JAXP in order to parse a XML. Surprisingly, it turned out that during XML Schema validation, the built-in implementation xerces issues a http request in order to resolve some stuff (which…
MRalwasser
  • 15,605
  • 15
  • 101
  • 147
0
votes
2 answers

Print XML file as-is in Apache FOP to PDF

I am trying to print an XML file "AS-IS" i,e. with tags into PDF using Apache FOP. I am started with ExampleXML2PDF example file in src dir of FOP 1.1. I am able to print formatted XML objects, not able to print XML with tags. XSL is as…
Tejas jain
  • 742
  • 7
  • 20
0
votes
1 answer

Java - when changing from jre 1.6 to 1.7 DocumentBuildFactory fails

I am trying to change a project to work on jre 1.7. But when I change the referenced library, I get an error with the following: DocumentBuildFactory documentBuildFactory = (DocumentBuilderFactory) = new …
Pectus Excavatum
  • 3,593
  • 16
  • 47
  • 68
0
votes
2 answers

How to input a variable with XML to validate against XSD

I have this code to make a validation of a XML file with a XSD. And this code works! var schemaFile = new Packages.java.io.File("C:\\schema.xsd"); var url = new Packages.java.net.URL("file:C:\\input.xml"); var xmlFile = new…
capzulu
  • 105
  • 1
  • 4
  • 13
0
votes
1 answer

Modifying existing DOM using XSL

I am using a framework where the XML DOM (instance of org.w3c.dom.Document) has listeners attached to it which basically helps it keeping track of all changes done to it once it was created (it is used internally to generate deltas). Now my…
ramoh
  • 153
  • 3
  • 15
0
votes
2 answers

XPath :: running counter two levels

Using the count(preceding-sibling::*) XPath expression one can obtaining incrementing counters. However, can the same also be accomplished in a two-levels deep sequence? example XML instance a
Marcus Junius Brutus
  • 26,087
  • 41
  • 189
  • 331
0
votes
2 answers

JAXP XPath 1.0 or 2.0 - how to distinguish empty strings from non-existent values

Given the following XML instance: Jack I am using the following code to: (a) iterate over the persons and (b) obtain the name of each…
Marcus Junius Brutus
  • 26,087
  • 41
  • 189
  • 331
0
votes
2 answers

How to get a clean Java VM on MacOS?

On MacOS (at least on SnowLeopard), the java command unconditionally adds an extra jar to the classpath: /System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/.compatibility/14compatibility.jar. This jar contains a version of Apache…
bmargulies
  • 97,814
  • 39
  • 186
  • 310
0
votes
0 answers

JAX WS: Duplication location of xmlns attribute

JAX WS is generating the following (only a snippet shown):
NRaf
  • 7,407
  • 13
  • 52
  • 91
0
votes
2 answers

Use XSLT to change elements to attributes and shorten names

I have a scenario where I need to convert: Thumb Pointer Middle To: I've been…
John Humphreys
  • 37,047
  • 37
  • 155
  • 255
0
votes
1 answer

How to start working with SAX, DOM, JAXP and JDOM

I am currently getting started with XML and Java. The author says that I will need DOM, SAX, JAXP and JDOM to work with the examples given. The book states that DOM and SAX come bundled with a parser of your choice, in my case Xerses-J. I have…
An SO User
  • 24,612
  • 35
  • 133
  • 221
0
votes
1 answer

SAXException with respect to JCIFS

In a functionality I framed a logic to read values from an uploaded xml file which is located in a remote protect share folder using JCIFS' SmbFile concept as follows: String JAXP_SCHEMA_LANGUAGE =…
IMJS
  • 863
  • 2
  • 13
  • 25
1 2 3
14
15