First off, when you use a StringReader (or any Reader) with an XML parser,
its got no way of knowing where to look for related files like DTDs or XSDs.
However if you were to write this file to disk somewhere then parse it via a
URL then it'd find your DTD.
Having said all that - if what you want
Hi. Clarification on what I am trying to do is this:
I have a Document, but I need to validate it against a DTD.
So, I convert it into a String and feed the String into a StringReader.
The StringReader is passed in as the parameter for creating a SaxReader.
// convert dom4j Document to St
Turns out I wasn't encoding the actual content of my XML output as UTF-16,
but because Windows Cp1252 (WinLatin1) charset resolves a paticular UTF-8
char to the euro symbol, it fooled me into thinking I was encoding the
output simply by setting the output format on the OutputFormat class. This
is
There is also a Sourceforge project
with a Java tool released under GPL license: http://diffxml.sourceforge.net/
--
knut
-Original Message-From: James Strachan
[mailto:[EMAIL PROTECTED]]Sent: Mittwoch, 19. Februar 2003
09:08To: Samuel Cheung;
[EMAIL PROTECTED]Subject: Re
Haven't tried any of them but google found me
these...
http://www.logilab.org/xmldiff/
http://www-106.ibm.com/developerworks/xml/library/x-diff/
http://www.alphaworks.ibm.com/tech/xmldiffmerge
James---http://radio.weblogs.com/0112098/
- Original Message -
From:
Samuel
I guess this is a bug that needs fixing. I suppose
setRootElement() should only remove any existing Element instances but keep any
PI or comments. I guess the Element should be appended to the end of the
Document's content() List.
James---http://radio.weblogs.com/0112098/
- Origina
From: "Marc Pellmann" <[EMAIL PROTECTED]>
> Hi!
>
> I want to read a File in dom4j - change some things - and than write to
> the File, with the same encoding. How to do this? I do not see a change
> to get the information of the encoding in the header of the xml file!?
We need to patch the code t
From: <[EMAIL PROTECTED]>
> I get the following exception when I try to read a file containing the
euro
> symbol:
>
> org.dom4j.DocumentException: invalid byte 1 of 1-byte UTF-8 sequence
(0x80)
> Nested exception: invalid byte 1 of 1-byte UTF-8 sequence (0x80)
> at org.dom4j.io.SAXReader.read
First off i'd recommend not using jaxp.jar any more and if you're using
xerces then use either xmlParserAPIs.jar or xml-apis.jar from
xml.apache.org. The former comes with Xerces and the latter is available
seperately and comes with Xalan.
xmlParserAPIs.jar = the parser part of JAXP
xml-apis.jar =
Stephen's right, characters like < > & must be encoded (escaped) as < or
> or &.
Joe your other option is to use a CDATA section which can include < > etc
James
---
http://radio.weblogs.com/0112098/
- Original Message -
From: "Stephen C. Upton" <[EMAIL PROTECTED]>
To: "Joe" <[EMAIL
10 matches
Mail list logo