473,472 Members | 1,761 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

serializing xml in java

Uri
Hi,
I am using apaches' XMLSerializer to serialize a DOM Document
as an OutputStream. 2 questions:
1) Is there a standard way of serializing XML(without using a specific
parser)?
2) Should there be any difference between explicitly setting the
OutputFormat
with "UTF-8" encoding or not setting it at all? from what I read the
default is "UTF-8" anyway, and the only difference would be the
"encoding" directive in the xml declaration. However, I am getting
different behavior in each case regarding the stream format(But I'm
still not sure it's the serializer and not something else). Is this
possible?
Jul 20 '05 #1
2 1431
Uri wrote:
I am using apaches' XMLSerializer to serialize a DOM Document
as an OutputStream. 2 questions:
1) Is there a standard way of serializing XML(without using a specific
parser)?


In DOM 3 Load and Save (which is a W3C recommendation since 07 April
2004), there is a LSSerializer interface.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Jul 20 '05 #2


Uri wrote:

I am using apaches' XMLSerializer to serialize a DOM Document
as an OutputStream. 2 questions:
1) Is there a standard way of serializing XML(without using a specific
parser)?


Sort of and a bit convoluted: you can use the default transformer
created with
javax.xml.transform.TransformerFactory.newTransfor mer()
to serialize.
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Martin Zeigler | last post by:
I have been using Weblogic 5.1 for a couple of years. I currently pass an object as a parameter to my ejbCreate method. The data in the object could be modified by my bean and the caller needs to...
4
by: Angelos Karantzalis | last post by:
Hi guys. I've come across a problem when I tried to serialize a class into xml, only to discover that the parent class's XML Serialization properties weren't included in the output xml. ...
1
by: Ivo Bronsveld | last post by:
All, I have quite a challenging task ahead of me. I need to write an object model (for code access) based on a schema, which cannot be made into a dataset because of it's complexity. So I...
10
by: copx | last post by:
I want to save a struct to disk.... as plain text. At the moment I do it with a function that just writes the data using fprintf. I mean like this: fprintf(fp, "%d %d", my_struct.a, my_struct.b)...
1
by: Chris | last post by:
I'm having trouble Serializing a System.Data.DataColumn object. When I try to serialize it, I get the following: System.NotSupportedException: Cannot serialize member...
2
by: Tobias Zimmergren | last post by:
Hi, just wondering what serializing really is, and howto use it? Thanks. Tobias __________________________________________________________________ Tobias ICQ#: 55986339 Current ICQ status: +...
4
by: Jason Shohet | last post by:
We are thinking of serializing an object & passing it toseveral functions on web service. This will happen about 35 times as the page loads. The class has about 20 attributes. We're not sure...
1
by: Tjerk Wolterink | last post by:
I have created an W3C XML DOM in java, it uses namespaces. Now i want to serialize it to the outputstream: === Document document=retrievePageDocument(page, manager.getDataStore());...
0
by: shaan | last post by:
Hi All, I am having problem in serializing the data back to a .Net client. The client gets back the object but all properties in the object seems to be null. I have implemented my webservice...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.