stax Questions

2

We have a system where we're processing XML files where the file itself is too large to fit in memory. As part of processing, we want to quickly scan through to record the offset of relevant eleme...
Jerrodjerrol asked 9/1, 2014 at 1:22

10

Solved

Is it possible using StAX (specifically woodstox) to format the output xml with newlines and tabs, i.e. in the form: <element1> <element2> someData </element2> </element1> instea...
Quijano asked 14/11, 2008 at 14:59

2

I am having trouble parsing an XML with no closing tag. Please see snippet of the xml below. I have tried SAX and also StAX Parser they both need a properly formatted XML with closing tag XXYY......
Crescint asked 6/1, 2018 at 16:48

7

Solved

The input file contains thousands of transactions in XML format which is around 10GB of size. The requirement is to pick each transaction XML based on the user input and send it to processing syste...
Morly asked 27/8, 2011 at 16:49

3

I'm trying to use the newFactory() method for XMLOutputFactory, which was added in Java 6. But Eclipse keeps flagging newFactory() as undefined for the type XMLOutputFactory. JRE7 is the only runti...
Crescendo asked 5/8, 2013 at 22:21

3

Solved

Starting learning the StAX, using XMLStreamReader, I faced with some problem. How can I get ALL content between tags as Text? I mean, I know name of needed tag, and when I find it, I must go to the...
Caye asked 27/12, 2012 at 8:56

5

This is more a general question by example: I'm using xstream and woodstox, woodstox comes with a service provider for javax.xml.stream.XMLOutputFactory in woodstox jar registering com.ctc.wstx.sta...
Microcircuit asked 23/7, 2013 at 10:5

4

Solved

I have the following two level XML structure. A list of boxes, each containing a list of drawers. <Boxes> <Box id="0"> <Drawers> <Drawer id="0"/> <Drawer id="1"/>...
Unhitch asked 28/7, 2016 at 8:26

2

Solved

I wrote a xml parser with StAx that I use to parse XML streams received from the server.Here is my code : private Map<String, IUnitaryAction> parse(InputStream is) throws XMLStreamException...
Bedraggled asked 12/5, 2011 at 10:26

6

Solved

Streaming xml-parsers like SAX and StAX are faster and more memory efficient than parsers building a tree-structure like DOM-parsers. SAX is a push parser, meaning that it's an instance of the obse...
Clausen asked 22/9, 2011 at 21:36

5

Solved

I would like to reuse some existing code in our code base that accepts an XMLStreamReader my application has the required data as a w3c Document. The following example is a minimum test case: pub...
Schulz asked 31/8, 2011 at 13:23

3

Solved

I have a number of small XML chunks, that should be embedded in one big XML as child elements. Is there any way to write these chunks to XMLStreamWriter without escaping them?
Fourchette asked 15/11, 2013 at 10:6

1

Solved

I'm writing an xml using XMLStreamWriter. But I do not need the prolog. <?xml version="1.0" ?> How can I omit this line in my output xml.
Government asked 24/9, 2015 at 13:14

4

I am using StAX for creating XML files and then validating the file with and XSD. I am getting an error while creating the XML file: javax.xml.stream.XMLStreamException: Underlying stream encodin...
Dennadennard asked 31/5, 2010 at 12:45

5

Solved

I do not see an option within javax.xml.stream.XMLEventWriter or javax.xml.stream.XMLOutputFactory to set either up in a way so that empty elements are written (instead of explicit start and end el...
Closure asked 29/6, 2010 at 15:51

2

The behavior of this method has changed in Java 8, it seems. I need some quick-fix for my problem. The problem is what I have some code which writes CR and LF after each XML node named <row>...
Tuchun asked 16/4, 2015 at 13:0

1

Solved

Does anyone know how to correctly output extended characters (non-BMP, more than 1 char) using Java's XMLStreamWriter? For example, trying to output Unicode U+10480 𐒀: import java.io.OutputStream...
Glasgow asked 21/2, 2015 at 18:7

4

Solved

I am using stax for the first time to parse an XML String. I have found some examples but can't get my code to work. This is the latest version of my code: public class AddressResponseParser { pr...
Maurene asked 10/1, 2011 at 22:36

1

Solved

When profiling my application, I noticed that creating instances of XMLInputFactory over and over is very expensive. Is it safe to share its instances across multiple threads? The javadoc doesn't ...
Ophite asked 7/2, 2014 at 17:39

1

Solved

Issue while Validating StAXSource in JBoss Server, What I Tried: I try to do parsing and validation at a time using StAX. As described in this example. I am able to execute the program as standalo...
Mastodon asked 10/12, 2013 at 11:32

1

Solved

I want to parse data using JAXB for the the following XSD schema http://www.uniprot.org/support/docs/uniprot.xsd . A typical XML for this looks like this: http://www.uniprot.org/uniprot/Q8NEJ9.xml...
Salamis asked 22/7, 2013 at 13:42

3

Solved

I have a huge XML (~2GB) and I need to add new Elements and modify the old ones. For example, I have: <books> <book>....</book> ... <book>....</book> </books&gt...
Acidophil asked 10/5, 2013 at 9:49

0

writer.writeStartElement(startElement.getName().getLocalPart()); //when i run on standalone machine with one thread, it works fine, but when i run the multiple jobs with multiple threads on the s...
Eusebioeusebius asked 26/3, 2013 at 19:17

4

Solved

I have program that needs to parse XML that contains character entities. The program itself doesn't need to have them resolved, and the list of them is large and will change, so I want to avoid exp...
Jackpot asked 22/11, 2009 at 5:11

3

I know I can validate xml-file when I use sax. But can I validate when I use Stax?
Disqualification asked 26/4, 2011 at 16:4

© 2022 - 2024 — McMap. All rights reserved.