Here's a good tutorial on how to use the serialiser:
http://metalab.unc.edu/xml/slides/sd2000west/xmlandjava/185.html
Boris Garbuzov wrote:
Even if I misuse the API (I should not call this directly?) it should have
failed friendlier than this:
Take a look at org.apache.xml.serialize package.
Boris Garbuzov wrote:
What people use to print DOM document in Xerces for Java? It is left
outside the core? Why not put to the core any default writer class
like DOMWriter from the samples? Can I use DOMWriter for commercial
needs, a little
Download the latest 1.0.3 version and you should see the package.
Boris Garbuzov wrote:
Where this package is? I am finding just following:
Try this:
gt; and lt;
Schomisch wrote:
Hi,
How can I convert by an example 'amplt;' in '' or
'amp;gt;' in ''.
A quick comment: In QName, the localname checking is only for null. Should add
checking for zero-length string too?
Kok Wai wrote:
A quick comment: In QName, the localname checking is only for null. Should
add
checking for zero-length string too?
There is a HTML parser in Swing/JFC. It is also event-based but not SAX.
Another bad news is the
parsed object tree is not DOM-based.
Rajiv Mordani wrote:
The xhtml parser from Sun is an internal only version which will be made
available for Apache as soon as the licensing issues are cleared.
That's a lot of baggage! Not to mention the Swing parser only supports HTML
3.2, if I remember
correctly.
Rajiv Mordani wrote:
Well the xhtml parser is infact just a small handler that builds on the
swing html parser using sax events.
- Rajiv
You have to initialise an OutputFormat object and pass it to the serialiser.
You set the Doctype declaration and other things like indentation in the
OutputFormat.
Arnaud Le Hors wrote:
The documentation is really sparse on this so maybe I'm just using it in
a way which is not intended but it
You can write a class that implements org.xml.sax.EntityResolver and returns
an InputSource that points to your local DTD copies. Pass this object to
the SAX parser using setEntityResolver.
Elliotte Rusty Harold wrote:
Is there any way in Xerces I can easily choose a specific DTD/schema to
I like to ask a question on the implementation of
javax.xml.parsers.SAXParserFactory: Why is the advantage of using
Thread.currentThread().getContextClassLoader().loadClass() to load class
compare to Class.forName()?
(This implementation also mean Xerces cannot be compile with JDK 1.1.x).
Get it at http://www.megginson.com/SAX/SAX2/
The xerces.jar that is included in xerces-J-bin.1.0.2.zip was built with
compression turned off. Is there a reason for this or an error in the
makefile? With compression turned on, the resulting xerces.jar is almost
half the size!
Xerces 1.0.2: Comments nodes are not printed properly by the serializer
IMHO. The following is the patch I've made for
org.apache.xml.serialize.BaseMarkupSerializer:
Index: BaseMarkupSerializer.java
===
RCS file:
When I parse two documents that uses the same DTD consecutively, and I
use the same instance of my implementation of EntityResolver, a stream
closed exception is thrown. The workaround is to create a new instance
for each document. This is rather inefficient as the same DTD is used
and one
When a Comment node is added to the DOM and serialised to a file, the
indentation is messed up. For example, using the Test2.java attached,
the result is:
?xml version=1.0 encoding=UTF-8?
root
ele1
ele2 attr1=attrval1/!-- This is a comment --/ele1
/root
I would expect the output be
Two ways you can try:
1) Wrap your FileInputStream with a BufferedInputStream, like:
InputSource biginput = new InputSource(new
BufferedInputStream(new
FileInputStream(C:\\kurs.xml)));
2) Use SAX
Mikael Helbo Kjær wrote:
Hi everyone.
I`m developing a Java Xml
A general XML question:
What's the most efficient way of appending data to a XML document? Let's
say I'm implementating a log file using XML. If I choose DOM, I need to
parse the file to DOM, get the document element, append the child node
and serialise back to file. I can't think of anyway using
In case you don't know already, SAX2 beta has been posted at
http://www.megginson.com/SAX/SAX2/
Doesn't using setPreserveSpace(false) in OutputFormat takes care of this?
Assaf Arkin wrote:
If you extract all these whitespaces from the original personal.xml, or
test run it with ProjectX (which does not add these whitespaces), you
will get the pretty printing you expect to.
When's the next binary distribution of Xerces-J?
Hi,
Just an observation: I see the DOM2 implementation is available but the
W3C interfaces are still at DOM1. BTW, W3C just released CR for DOM2.
I've got the answer from Brian: it is due to the change of CVS server, it is
now at
:pserver:[EMAIL PROTECTED]:/home/cvspublic
Stefano Mazzocchi wrote:
I got them, but I'm not doing anonCVS. Maybe a group visibility problem?
: warning: unrecognized response `cvs: setgroups: Operation not
permitted' from cvs server
cvs server: Updating xml-xalan
CVS.EXE checkout: move away xml-xalan/BUGS; it is in the way
C xml-xalan/BUGS
PS: The above is a snippet when checking out xalan but it is true for all
modules.
Wong Kok Wai
Thanks for this info!
Shaoping Zhou wrote:
So, you may also be able to just hack that line by changing dev.apache.org
to xml.apache.org, and see if it works without having to either use a new
workspace dir or deleting the old xml related package dirs.
Sad to say this doesn't work.
Just tried it and found one small typo: the user should be anoncvs
Brian Behlendorf wrote:
That's because the CVS repositories were moved at the beginning of the
week. You should be using the following CVSROOT for pserver access now:
:pserver:[EMAIL PROTECTED]:/home/cvspublic
Second try. I've even do a fresh checkout but still couldn't find these
checkins.
Any clue?
Wong Kok Wai wrote:
I can't seem to find these checkins in the CVS, both the anoncvs and the web.
Assaf Arkin wrote:
arkin 99/11/23 14:29:53
Added: java/src/org/apache/xml
I can't seem to find these checkins in the CVS, both the anoncvs and the web.
Assaf Arkin wrote:
arkin 99/11/23 14:29:53
Added: java/src/org/apache/xml/serialize BaseSerializer.java
ElementState.java HTMLEntities.res
The Jakarta project (another Apache-hosted project) is using a Java-based make
tool (I think it's called Ant)
which I believe solves most cross-platform issues (since it's Java). Another
note is Ant's makefile is XML-based,
so I think it's ironical if Xerces-J/Xalan-J is not using Ant.
Scott
29 matches
Mail list logo