936 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
2
answers
134
views
Parsing UTF-8 XML using DefaultHandler: when / how does it become UTF-16 in Java?
I have a Java program that was working perfectly in Corretto 17, but is now having character set encoding issues in Corretto 25.
I am reading a UTF-8 encoded XML from an external API. The code is ...
1
vote
2
answers
111
views
SAX XML API program on IBM i ends prematurely after ~889570 records with no error β how to debug and trap errors?
I'm working with an RPGLE program on IBM i (AS/400) that uses the QxmlSAXParser_parse_systemid() API to parse large XML files stored in the IFS.
π§ Environment:
IBM i v7.3
RPGLE (ILE), compiled with ...
0
votes
1
answer
22
views
Android SAXParserFacotry.newInstance() Throws Exception when Minify Enabled
I enabled Minify in my release for SDK 15 as a target and now some installs get a failure:
Exception q1.b:
at javax.xml.parsers.FactoryFinder.newInstance (FactoryFinder.java:200)
at javax.xml....
0
votes
0
answers
43
views
Spring integration - custom ISOEntities inject
I'm using spring integration for execute xml element extraction:
<bean id="myDmTypeXPathExpression" class="org.springframework.xml.xpath.XPathExpressionFactoryBean">
<...
0
votes
0
answers
76
views
Distinguishing whole closing tag ("</tag>") and self-closing tag ("<tag ... />") in SAX endElement [duplicate]
I extended org.xml.sax.helpers.DefaultHandler. When during the parsing an element closes and my endElement callback executes, I would like to be able to tell whether in the XML the element is closed ...
0
votes
1
answer
43
views
How to get node outside loop while using sax parser
I need to parse document using SAX parser in java. I was able to print all the node values if I use DefaultHandler class traditionally implementing the startElement, endElement and characters method. ...
1
vote
0
answers
491
views
javax SchemaFactory disable access to external entities not recognized
I am using javax SchemaFactory to parse an XML file. I get a SonarLint warning "Disable access to external entities in XML parsing.". The warning goes away when adding two properties "...
0
votes
0
answers
65
views
Saxon 10 by default considering given input parameter as a string
I have updated Saxon from version9 to version10. But for the same Xsl code getting different result.
In Saxon10 by default its considering input parameter as string, But in Saxon9 its considering ...
2
votes
1
answer
2k
views
Java 17 migration, JEP-403 and Xerces - properties ACCESS_EXTERNAL_DTD and ACCESS_EXTERNAL_SCHEMA not supported
Whilst migrating to Java 17, I tried to include an external Xerces dependency, following the JEP-403 recommendation. JEP-403 explicitly states the following under "Risks and Assumptions":
&...
0
votes
1
answer
134
views
JAXB + SAX + Open JDK 8 Getting Connection Reset by Client Exception
My code downloads XML report from net and assigns the raw XML to a String variable. It then creates a SAXPaser like so:
try {
SAXParserFactory spf = SAXParserFactory.newInstance();
...
2
votes
1
answer
135
views
Xml Reader parsing character outside BMP to surrogate pairs which results in invalid xml
I am trying to parse an xml which contains hex value of 𝓅. This represents the mathematical symbol p. The output that I am getting is ��.
What am I doing wrong?
...
3
votes
1
answer
335
views
SAXParser returns wrong characters
I currently analyze an issue where an additionally character appears in the data provided by the characters() method called from SAXParser. This happens on a huge file (> 800MB) and the data in the ...
0
votes
1
answer
64
views
unescape userdefined entities from xml
There have some userdefined entities in the input xml like &key; and ‐.
We have defined these entites as DOCTYPE in the below xsl:-
<!DOCTYPE xsl:stylesheet [
<!ENTITY key "&...
0
votes
1
answer
43
views
converting entities only at some specific places in xml
Following code unescapes the entities from xml:-
<xsl:stylesheet version='3.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:output method="xml" omit-xml-declaration=&...
0
votes
2
answers
63
views
entity translation to customized entity
There are some user defined entites in the xml data. In order to unescape those entities, we are using below code:-
<xsl:stylesheet version='3.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' &...