Tagged Questions
5
votes
0answers
1k views
transformer.setOutputProperty(OutputKeys.ENCODING, “UTF-8”) is NOT working
I have the following method to write an XMLDom to a stream:
public void writeToOutputStream(Document fDoc, OutputStream out) throws Exception {
fDoc.setXmlStandalone(true);
DOMSource ...
3
votes
0answers
233 views
JAXB XmlAnyElement set namespace attribute
I have a simple Java class I am annotating with JAXB:
class Foo {
@XmlAnyElement(lax=true)
List<Object> any;
}
Which produces the following schema:
<xs:complexType name="foo">
...
3
votes
0answers
448 views
JAXB Parsing - weird behavior
I am receiving a valid XML from server. lets say
XSD
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
...
2
votes
0answers
39 views
Do I need server code in order to edit server files remotely?
I have a web server with an xml file that at some point is going to hold the information for posts on the website. This is the xml's structure.
<?xml version="1.0" encoding="ISO-8859-1"?>
...
2
votes
0answers
46 views
Trying to structure this XML and use JAXB — Having some Inheritance issues
Also, please feel free to come up with a better way to do this.
Here is the XML I'm trying to parse (These are two different instances of XML I can have, never at the same time)
<Result ...
2
votes
0answers
53 views
Append to an XML file
I am writing some data to an XML file.
Here is the code:
try {
DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = ...
2
votes
0answers
113 views
Why I'm getting this, org.xml.sax.SAXParseException, exception?
I'm working in OpenBravoPOS v2.30, anyone knows about it? It's a POS with free licence.
I'm trying to improve it, but in one of my test computers, it fails.
Before all, I'd read about similar cases ...
2
votes
0answers
69 views
JAXB not recognise type just puts xs:anyType in schema
How to force JAXB to recognise real type in following example as it creates xs:anyType when generates xml schema
implementation class
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = ...
2
votes
0answers
187 views
How to exclude properties when requesting from struts-rest-plugin?
I am working on struts-rest-plugin index method to return list of my Fruit objects in xml or json format. It works really well.
Model class:
class Fruit {
private String name;
private ...
2
votes
0answers
270 views
Best way to compare two very large XML files record by record
I have two large XML files (3GB, 80000 records). One is updated version of another. I want to identify which records changed (were added/updated/deleted). There are some timestamps in the files, but I ...
2
votes
0answers
201 views
JAXB Bindings File Sets @XmlElement type to String instead of XMLGregorianCalendar
I'm trying to create an XmlAdapter that takes in an XMLGregorianCalendar and outputs an XMLGregorianCalendar. The purpose is simlply to remove timezone data from the element when unmarshalling data.
...
2
votes
0answers
147 views
Can I create a JSP from dynamically generated XML?
I want to generate a JSP using XSLT and <x:transform> tag. But I don't have an XML-file on my file system, and I can't import it like: <c:import url="./xml/MyXml.xml" var="xmldoc"/>. It is ...
2
votes
0answers
77 views
not recognized as a field
Ok guys. So I attempted to upload an image to my drawable-hdpi file when i immediatly got an error in my source.
@Override
protected void onCreate(Bundle savedInstanceState) {
...
2
votes
0answers
143 views
how to create main.xml dynamically in android using java code?
I am try to make one xml code to dynamically without need xml. its using java code only. anybody help me how to make javacode for this xml content. i do't want to use my main.xml in resource.
...
2
votes
0answers
111 views
How to set encoding attribute of XML prolog in JTidy?
I need to generate XML from a HTML file with JTidy. The encoding of the source is GB2312, so I need to set the encoding of the generated XML to GB2312 as well.
Current XML prolog:
<?xml ...