[jdom-interest] RE: jdom-interest digest, Vol 1 #297 - 12 msgs (Problem parsing cdata)

Brett McLaughlin brett.mclaughlin at lutris.com
Wed Oct 18 08:50:51 PDT 2000


I made a fix for this this morning - honestly, there are still some problems in Xerces with inline DTDs, and I'm working on those... but I did write a workaround this morning to make it work until then.

Check out the latest in CVS and let me know.

Thanks,
Brett

----- Replied message -----
 Sender: Dan Warburton <warb at tgf.tc.faa.gov>
Subject: [jdom-interest] RE: jdom-interest digest, Vol 1 #297 - 12 msgs (Problem parsing cdata)
   Date: 10/18/2000 8:58:48 AM
----- Original message ----
> Guy,
> I reported a very similar problem about a week ago. I got
> no response.
> I patched the SAXBuilder with this: If you get an answer
> from someone who
> knows please pass it on to me.
> 
> Thanks
> 
> onorion{warb}-> diff SAXBuilder.java SAXBuilder.java.save
> 3,8d2
> <  *****************************< NOTICE
> >*******************************
> <  This file has been modified by Jim Mauroff,ACT-510 0n
> 10/12/2000.
> <  In the SaxHandler class the method characters has been
> modified.
> <  See characters for details.
> < 
> ***********************************************************
> ***********
> <
> 666,670c660
> <             }
> <         }
> <           // the following else was taken out of the
> above
> <           // 'else if' inorder to get the content of the
> elements.
> <         else {
> ---
> >             } else {
> 672a663
> >             }
> 
> > -----Original Message-----
> > From: jdom-interest-admin at jdom.org
> > [mailto:jdom-interest-admin at jdom.org]On Behalf Of
> > jdom-interest-request at jdom.org
> > Sent: Tuesday, October 17, 2000 8:34 PM
> > To: jdom-interest at jdom.org
> > Subject: jdom-interest digest, Vol 1 #297 - 12 msgs
> >
> >
> > Send jdom-interest mailing list submissions to
> > 	jdom-interest at jdom.org
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> > 
> http://lists.denveronline.net/mailman/listinfo/jdom-interes
> t
> > or, via email, send a message with subject or body
> 'help' to
> > 	jdom-interest-request at jdom.org
> >
> > You can reach the person managing the list at
> > 	jdom-interest-admin at jdom.org
> >
> > When replying, please edit your Subject line so it is
> more specific
> > than "Re: Contents of jdom-interest digest..."
> >
> >
> > Today's Topics:
> >
> >    1. Re: Getting more detail from JDOMException.
> (Elliotte Rusty Harold)
> >    2. JDOM, Xalan and Servlets (Ana Paula Fernandes)
> >    3. RE: round trip XML (Brad Morgan)
> >    4. Re: JDOM, Xalan and Servlets (James Strachan)
> >    5. Re: JDOM, Xalan and Servlets (bob)
> >    6. Re: round trip XML (Alex Chaffee)
> >    7. Re: XPath Examples + Spitfire (bob)
> >    8. Problem parsing cdata (Guy Lichtman)
> >    9. Messaging:  JMS Unable to Serialize Document
> (Steve Morris)
> >   10. Re: Messaging:  JMS Unable to Serialize Document
> (Jason Hunter)
> >   11. PROPOSAL: Remove most constructors from
> XMLOutputter (was
> > round trip XML) (Alex Chaffee)
> >   12. re: beta-5 woes (Matt Magoffin)
> >
> > --__--__--
> >
> > Message: 1
> > Date: Tue, 17 Oct 2000 07:57:26 -0400
> > To: jdom-interest at jdom.org
> > From: Elliotte Rusty Harold <elharo at metalab.unc.edu>
> > Subject: Re: [jdom-interest] Getting more detail from
> JDOMException.
> >
> > When working on my XInclude processor in JDOM
> > <http://www.ibiblio.org/xml/XInclude/> the problem
> seemed a little
> > deeper to me.   The processor had to notice semantic
> problems with
> > the specific vocabulary (XInclude) and report those
> errors. These are
> > not well-formedness errors or validity errors, just
> violations that
> > are specific to my vocabulary such as circular include
> or a URL that
> > can't be retrieved.
> >
> > It would be extremely useful to be able to locate the
> exact line
> > number and perhaps column number where the problem
> occurred. However,
> > short of reparsing the problem file with SAX to look for
> the line
> > number of the offending element, I couldn't find an easy
> way to get
> > this. This means the user who receives an error message
> has to hunt
> > through the entire file to try to find the mistake.
> Something like
> > the SAX2 Locator interface, or at least the
> functionality of that
> > interface, would seem to be useful for at least some use
> cases,
> > though perhaps this is a 1.1 addition.
> > --
> >
> >
> +-----------------------+------------------------+---------
> ----------+
> > | Elliotte Rusty Harold | elharo at metalab.unc.edu |
> Writer/Programmer |
> >
> +-----------------------+------------------------+---------
> ----------+
> > |                  The XML Bible (IDG Books, 1999)      
>             |
> > |              http://metalab.unc.edu/xml/books/bible/  
>             |
> > |  
> http://www.amazon.com/exec/obidos/ISBN=0764532367/cafeaulai
> tA/   |
> >
> +----------------------------------+-----------------------
> ----------+
> > |  Read Cafe au Lait for Java News: 
> http://metalab.unc.edu/javafaq/ |
> > |  Read Cafe con Leche for XML News:
> http://metalab.unc.edu/xml/     |
> >
> +----------------------------------+-----------------------
> ----------+
> >
> > --__--__--
> >
> > Message: 2
> > Date: Tue, 17 Oct 2000 10:25:43 -0500
> > From: "Ana Paula Fernandes" <afernandes at ws.uabmc.edu>
> > To: jdom-interest at jdom.org
> > Subject: [jdom-interest] JDOM, Xalan and Servlets
> >
> > Hello,
> >
> > I am looking for some help to output a servlet response
> to the browser
> > that contains HTML generated through an XML
> transformation. I have a
> > class called XML_Formatter that is supposed to read XML
> strings,  build
> > a JDOM document, use Xalan XSLT processor (process the
> document applying
> > a stylesheet to it) and give this result back to the
> servlet response to
> > output it to the browser. It seems quite simple as the
> source code
> > actually is, but I just dont seem to be able to get
> anything in the
> > browser at all. I'm using threads and PipedInput/Output
> Streams to pass
> > the JDOM document back and forth through the XSL
> processor. So how can I
> > send my outputstream to the servlet response ? How do I
> print an
> > outputstream (PipedOutputStream in this case) ? Do I
> need to rebuild a
> > JDOM document after I have my xml doc. transformed ? Is
> there another
> > solution to combine JDOM with Xalan and Servlets without
> > PipedInput/OutputStreams and threads ? I am willing to
> send the source
> > code to anyone who can help me to figure this out.
> >
> > Thank you,
> >
> > Ana Paula Fernandes
> > Health Systems Information Services
> > University of Alabama in Birmingham
> > email: afernandes at ws.uabmc.edu
> > phone: (205) 975-5447
> >
> >
> > --__--__--
> >
> > Message: 3
> > From: "Brad Morgan" <Brad.Morgan at e-pubcorp.com>
> > To: <jdom-interest at jdom.org>
> > Subject: RE: [jdom-interest] round trip XML
> > Date: Tue, 17 Oct 2000 10:08:19 -0600
> >
> > Alex,
> >
> > I agree with you on the constructor issue.  I think
> adding the new ones is
> > the
> > upwardly compatible thing to do, but I'm acceptable to
> removing
> > all but the
> > default as well.  Either change produces a more
> consistant interface.  The
> > current set of constructors seems lacking in consistancy
> given the ways in
> > which people are tending to use them (pick a constructor
> that almost does
> > what you want, then fine tune with methods).
> >
> > Brad Morgan
> > e-Publishing Corp.
> >
> > Email: Brad.Morgan at e-pubcorp.com
> > Phone: (719)593-7377 x35
> > Fax: (719)593-2996
> >
> > e-Publishing Corp. is a BroadVision company
> > URL: http://www.e-pubcorp.com
> >
> >
> > -----Original Message-----
> > From: jdom-interest-admin at jdom.org
> > [mailto:jdom-interest-admin at jdom.org]On Behalf Of Alex
> Chaffee
> > Sent: Monday, October 16, 2000 3:58 PM
> > To: Patrick Dowler
> > Cc: jdom-interest at jdom.org
> > Subject: Re: [jdom-interest] round trip XML
> >
> >
> > That's what the new method setTrimText(true) is for. 
> The idea is:
> > either you
> >
> >  - pass whitespace through unchanged, and turn off
> newlines and indent
> >
> >  - or strip it with trimText, and turn on newlines and
> indent
> >
> > I'm reluctant to add this property to the constructor,
> since it's a
> > slippery slope.  In fact, I'd like to strip all but the
> default
> > constructor, but I can see how some find the extra
> constructors
> > useful.
> >
> > On reflection, maybe there should be a constructor
> >
> > XMLOutputter(boolean trimText, boolean newlines, boolean
> indent)
> >
> > So you can simply call
> >
> > new XMLOutputter(false,false,false)
> >
> > for the first case,
> >
> > new XMLOutputter(true,true,true)
> >
> > for the second, and
> >
> > new XMLOutputter(true,false,false)
> >
> > for the most compact representation.
> >
> > > (1) if the newlines==true, I get an extra blank line
> except after the
> > > DocType, ie:
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <foo>
> > >
> > >   <bar/>
> > >
> > > </foo>
> > >
> > > This is because the "\n"s in the xml file are kept as
> separate Elements
> >
> > text nodes, not Elements
> >
> > > in the Document, presumably.
> >
> > Yes, and since the whitespace between the doctype and
> the first (root)
> > element is effectively stripped, since there's no place
> for a text
> > child of Document (only comments, PIs, and a single
> element).  I
> > think.
> >
> >
> > > RFE: Maybe the outputter could add a newline after the
> DocType anyway,
> > > or this could be turned on as distinct from the
> newlines arg/setting?
> >
> > No, that's not necessary.
> >
> >
> > --
> > Alex Chaffee                       mailto:alex at jguru.com
> > jGuru - Java News and FAQs        
> http://www.jguru.com/alex/
> > Creator of Gamelan                
> http://www.gamelan.com/
> > Founder of Purple Technology      
> http://www.purpletech.com/
> > Curator of Stinky Art Collective   http://www.stinky.com/
> > _______________________________________________
> > To control your jdom-interest membership:
> >
> http://lists.denveronline.net/mailman/options/jdom-interest
> /yourad
> > dr at yourhos
> > t.com
> >
> >
> > --__--__--
> >
> > Message: 4
> > From: James Strachan <james at metastuff.com>
> > To: Ana Paula Fernandes <afernandes at ws.uabmc.edu>,
> jdom-interest at jdom.org
> > Subject: Re: [jdom-interest] JDOM, Xalan and Servlets
> > Date: Tue, 17 Oct 2000 17:27:13 +0100
> >
> > I don't really think this has much to do with JDOM - its
> an XSLT issue.
> >
> > Basically you want the XSLT processor to output the HTML
> in the
> > response to
> > the browser, so the XSLT processor should be using the
> Writer
> > returned from
> > HttpServletResponse.getWriter() to output its results.
> >
> > This is fairly basic Servlet / XSLT stuff - I'd look at
> (say)
> > Xalan's site,
> > examples, mail list, etc for more help.
> (http://xml.apache.org)
> >
> > Regards
> > James
> >
> > James Strachan
> > =============
> > email: james at metastuff.com
> > web: http://www.metastuff.com
> > ----- Original Message -----
> > From: "Ana Paula Fernandes" <afernandes at ws.uabmc.edu>
> > To: <jdom-interest at jdom.org>
> > Sent: Tuesday, October 17, 2000 4:25 PM
> > Subject: [jdom-interest] JDOM, Xalan and Servlets
> >
> >
> > > Hello,
> > >
> > > I am looking for some help to output a servlet
> response to the browser
> > > that contains HTML generated through an XML
> transformation. I have a
> > > class called XML_Formatter that is supposed to read
> XML strings,  build
> > > a JDOM document, use Xalan XSLT processor (process the
> document applying
> > > a stylesheet to it) and give this result back to the
> servlet response to
> > > output it to the browser. It seems quite simple as the
> source code
> > > actually is, but I just dont seem to be able to get
> anything in the
> > > browser at all. I'm using threads and
> PipedInput/Output Streams to pass
> > > the JDOM document back and forth through the XSL
> processor. So how can I
> > > send my outputstream to the servlet response ? How do
> I print an
> > > outputstream (PipedOutputStream in this case) ? Do I
> need to rebuild a
> > > JDOM document after I have my xml doc. transformed ?
> Is there another
> > > solution to combine JDOM with Xalan and Servlets
> without
> > > PipedInput/OutputStreams and threads ? I am willing to
> send the source
> > > code to anyone who can help me to figure this out.
> > >
> > > Thank you,
> > >
> > > Ana Paula Fernandes
> > > Health Systems Information Services
> > > University of Alabama in Birmingham
> > > email: afernandes at ws.uabmc.edu
> > > phone: (205) 975-5447
> > >
> > > _______________________________________________
> > > To control your jdom-interest membership:
> > >
> >
> http://lists.denveronline.net/mailman/options/jdom-interest
> /yourad
> > dr at yourhos
> > t.com
> > >
> >
> >
> > If you are not the addressee of this confidential e-mail
> and any
> > attachments, please delete it and inform the sender;
> unauthorised
> > redistribution or publication is prohibited. Views
> expressed are those of
> > the author and do not necessarily represent those of
> Citria Limited.
> >
> > --__--__--
> >
> > Message: 5
> > Date: Tue, 17 Oct 2000 12:44:58 -0400 (EDT)
> > From: bob <bob at accurev.com>
> > To: Ana Paula Fernandes <afernandes at ws.uabmc.edu>
> > cc: jdom-interest at jdom.org
> > Subject: Re: [jdom-interest] JDOM, Xalan and Servlets
> >
> > > Is there another solution to combine JDOM with Xalan
> and Servlets
> > > without PipedInput/OutputStreams and threads ? I am
> willing to send the
> > > source code to anyone who can help me to figure this
> out.
> >
> > fwiw,
> >
> > It's my intention, after completing the XPath stuff I'm
> > currently working on, is to then build a JDOM-native
> > XSLT processor, to obviate the need for piping XML
> > to Xalan.  Hopefully, just transform an org.jdom.Document
> > into another org.jdom.Document, wish which you could
> > do whatever you like.
> >
> > Though, that'ss still a ways off.  (Though, XPath
> > functionality is about 95% complete at this point).
> >
> > 	-bob
> >
> >
> > --__--__--
> >
> > Message: 6
> > Date: Tue, 17 Oct 2000 11:06:15 -0700
> > From: Alex Chaffee <guru at edamame.stinky.com>
> > To: Patrick Dowler <Patrick.Dowler at nrc.ca>
> > Cc: alex at jguru.com, jdom-interest at jdom.org
> > Subject: Re: [jdom-interest] round trip XML
> > Reply-To: alex at jguru.com
> >
> > > > I'm reluctant to add this property to the
> constructor, since it's a
> > > > slippery slope.  In fact, I'd like to strip all but
> the default
> > > > constructor, but I can see how some find the extra
> constructors
> > > > useful.
> > > >
> > > > On reflection, maybe there should be a constructor
> > > >
> > > > XMLOutputter(boolean trimText, boolean newlines,
> boolean indent)
> > >
> > > The indent art is currently a String (typically "   "
> or "").
> >
> > There's also setIndent(boolean doIndent) which uses "  ".
> >
> > > I'm not that keen on method signatures like
> (boolean,boolean,boolean)
> > > since it is always hard to recall what order things
> are in. Something
> > > like (int,int) is OK for position because everyone
> takes it as (x,y).
> > >
> > > For convenience of writing the code, it seems that
> > >
> > > 	XMLOutputter()
> > > 	XMLOutputter(boolean pretty)
> > >
> > > would suffice. If someone wants to actually tune the
> output
> > precisely, making a
> > > few method calls is not too much to ask. Maybe pretty
> would
> > give trimText,
> > > newlines, indent of 2-4 spaces, and a line-break after
> 80 chars.
> >
> > I kind of like that.  I was shying away from setPretty()
> but it might
> > be nice to have a shortcut "do what I mean" button.
> >
> >  - A
> >
> >
> > --
> > Alex Chaffee                       mailto:alex at jguru.com
> > jGuru - Java News and FAQs        
> http://www.jguru.com/alex/
> > Creator of Gamelan                
> http://www.gamelan.com/
> > Founder of Purple Technology      
> http://www.purpletech.com/
> > Curator of Stinky Art Collective   http://www.stinky.com/
> >
> > --__--__--
> >
> > Message: 7
> > Date: Tue, 17 Oct 2000 15:04:29 -0400 (EDT)
> > From: bob <bob at accurev.com>
> > To: Jon Baer <jonbaer at musicphone.com>
> > cc: jdom-interest at jdom.org
> > Subject: Re: [jdom-interest] XPath Examples + Spitfire
> >
> > > Can someone post an example of how to use the contrib
> xpath package?
> >
> > The XPath stuff in jdom-contrib has stalled, and been
> moved
> > to:
> >
> > 	http://code.werken.com/xpath/
> >
> > Since I'll be basing an XSLT implementation on top of it,
> > I decided for the time-being that an independent location
> > might be best.  (But, as mentioned before, it's
> Apache-style
> > licensed, so it can be re-integrated to jdom whever
> someone
> > feels like it.)
> >
> > It's not 100% complete, and there's not much user-land
> > documentation, but the javadocs for the relevant classes
> > are mostly complete.
> >
> > 	-bob
> >
> >
> > --__--__--
> >
> > Message: 8
> > From: "Guy Lichtman" <guy at nomadiq.com>
> > To: <jdom-interest at jdom.org>
> > Date: Tue, 17 Oct 2000 22:02:08 +0200
> > Subject: [jdom-interest] Problem parsing cdata
> >
> > This is a multi-part message in MIME format.
> >
> > ------=_NextPart_000_0186_01C03885.E480B560
> > Content-Type: text/plain;
> > 	charset="iso-8859-1"
> > Content-Transfer-Encoding: quoted-printable
> >
> > When running the SAXBuilderDemo if found that it strips
> out cdata from =
> > elements
> >
> > on the following file:
> >
> > <?xml version=3D"1.0"?>
> >
> > <!DOCTYPE Simple [
> >
> >  <!ELEMENT Simple ( VerySimple?, ( MySimple | YourSimple
> ) )>
> >
> >
> >  <!ELEMENT VerySimple (#PCDATA)>
> >
> >
> >  <!ELEMENT MySimple (#PCDATA)>
> >
> >  <!ATTLIST MySimple type ( MI | MS | IS ) "IS" >
> >
> >  <!ELEMENT YourSimple (#PCDATA)>
> >
> >  ]>
> >
> >  <Simple>
> >   <VerySimple>hello</VerySimple>
> >  <MySimple type=3D"IS" />
> > =20
> >
> > </Simple>
> >
> >
> > I get the following output:
> >
> > <?xml version=3D"1.0" encoding=3D"UTF-8"?>
> >
> > <!DOCTYPE Simple>
> >
> > <Simple>
> >
> >   <VerySimple></VerySimple>
> >
> >   <MySimple type=3D"IS"></MySimple>
> >
> > </Simple>
> >
> > I am new to jdom, but it looks like the builder strips
> out the cdata =
> > "hello". Why is this?
> > and how can i avoid this?
> > I am using the default xerces parser.
> >
> > ------=_NextPart_000_0186_01C03885.E480B560
> > Content-Type: text/html;
> > 	charset="iso-8859-1"
> > Content-Transfer-Encoding: quoted-printable
> >
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
> Transitional//EN">
> > <HTML><HEAD>
> > <META http-equiv=3DContent-Type content=3D"text/html; =
> > charset=3Diso-8859-1">
> > <META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR>
> > <STYLE></STYLE>
> > </HEAD>
> > <BODY bgColor=3D#c8e0d8>
> > <DIV><FONT face=3DArial size=3D2>When running the
> SAXBuilderDemo if =
> > found that it=20
> > strips out cdata from elements</FONT></DIV>
> > <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
> > <DIV><FONT face=3DArial size=3D2>on the following
> file:</FONT></DIV>
> > <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
> > <DIV><FONT face=3DArial size=3D2>&lt;?xml =
> > version=3D"1.0"?&gt;</FONT></DIV>
> > <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
> > <DIV><FONT face=3DArial size=3D2>&lt;!DOCTYPE Simple
> [</FONT></DIV>
> > <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
> > <DIV><FONT face=3DArial size=3D2>&nbsp;&lt;!ELEMENT
> Simple ( =
> > VerySimple?, ( MySimple=20
> > | YourSimple ) )&gt;</FONT></DIV>
> > <DIV><FONT face=3DArial
> size=3D2></FONT>&nbsp;</DIV><FONT face=3DArial =
> > size=3D2>
> > <DIV><BR>&nbsp;&lt;!ELEMENT VerySimple
> (#PCDATA)&gt;</DIV>
> > <DIV>&nbsp;</DIV>
> > <DIV><BR>&nbsp;&lt;!ELEMENT MySimple (#PCDATA)&gt;</DIV>
> > <DIV>&nbsp;</DIV>
> > <DIV>&nbsp;&lt;!ATTLIST MySimple type ( MI | MS | IS )
> "IS" &gt;</DIV>
> > <DIV>&nbsp;</DIV>
> > <DIV>&nbsp;&lt;!ELEMENT YourSimple (#PCDATA)&gt;</DIV>
> > <DIV>&nbsp;</DIV>
> > <DIV>&nbsp;]&gt;</DIV>
> > <DIV>&nbsp;</DIV>
> >
> <DIV>&nbsp;&lt;Simple&gt;<BR>&nbsp;&nbsp;&lt;VerySimple&gt;
> hello&lt;/Very=
> > Simple&gt;<BR>&nbsp;&lt;MySimple=20
> > type=3D"IS" /&gt;<BR>&nbsp;</DIV>
> > <DIV>&nbsp;</DIV>
> > <DIV>&lt;/Simple&gt;</DIV>
> > <DIV>&nbsp;</DIV>
> > <DIV>&nbsp;</DIV>
> > <DIV>I get the following output:</DIV>
> > <DIV>&nbsp;</DIV>
> > <DIV>&lt;?xml version=3D"1.0"
> encoding=3D"UTF-8"?&gt;</DIV>
> > <DIV>&nbsp;</DIV>
> > <DIV>&lt;!DOCTYPE Simple&gt;</DIV>
> > <DIV>&nbsp;</DIV>
> > <DIV>&lt;Simple&gt;</DIV>
> > <DIV>&nbsp;</DIV>
> > <DIV>&nbsp; &lt;VerySimple&gt;&lt;/VerySimple&gt;</DIV>
> > <DIV>&nbsp;</DIV>
> > <DIV>&nbsp; &lt;MySimple
> type=3D"IS"&gt;&lt;/MySimple&gt;</DIV>
> > <DIV>&nbsp;</DIV>
> > <DIV>&lt;/Simple&gt;<BR></DIV>
> > <DIV>I am new to jdom, but it looks like the builder
> strips out the =
> > cdata=20
> > "hello". Why is this?</DIV>
> > <DIV>and how can i avoid this?</DIV>
> > <DIV>I am using the default xerces
> parser.</DIV></FONT></BODY></HTML>
> >
> > ------=_NextPart_000_0186_01C03885.E480B560--
> >
> >
> > --__--__--
> >
> > Message: 9
> > From: "Steve Morris" <steve.morris at nwa.com>
> > To: <jdom-interest at jdom.org>
> > Cc: "Susan Sjoblom" <susan.sjoblom at nwa.com>
> > Date: Tue, 17 Oct 2000 15:57:31 -0500
> > Subject: [jdom-interest] Messaging:  JMS Unable to
> Serialize Document
> >
> > I'm having difficulty sending JDOM XML Documents to
> MQSeries
> > queues via Java
> > Messaging Service (JMS).
> >
> > I have a javax.jms.ObjectMessage defined as...
> >
> > > ObjectMessage myMessage;
> >
> > When I try to call the its setObject method, providing
> my JDOM Document as
> > the argument...
> >
> > > myMessage.setObject(myDocument);
> >
> > JMS throws the following....
> >
> > > javax.jms.MessageFormatException:
> > > MQJMS1060: Unable to serialize object
> >
> > Here's a link to the javax.jms.ObjectMessage where
> > setObject(java.io.Serializable object) is defined...
> >
> > >
> >
> http://java.sun.com/products/jms/javadoc-102a/javax/jms/Obj
> ectMessage.html
> >
> >
> > Doesn't org.jdom.Document implement serializable?
> > When I send other types of Objects such as...
> >
> > > String myString = "A String in an Object";
> >
> > > myMessage.setObject(myString);
> >
> > it works ok.
> >
> > What am I missing?
> >
> >
> > Steviemo
> >
> >
> > --__--__--
> >
> > Message: 10
> > Date: Tue, 17 Oct 2000 15:23:34 -0700
> > From: Jason Hunter <jhunter at collab.net>
> > To: Steve Morris <steve.morris at nwa.com>
> > CC: jdom-interest at jdom.org, Susan Sjoblom
> <susan.sjoblom at nwa.com>
> > Subject: Re: [jdom-interest] Messaging:  JMS Unable to
> Serialize Document
> >
> > Let me say this one more time:
> >
> > Before reporting a potential bug, make sure you try the
> latest code and
> > SAY that you're using the latest code.  This sounds like
> you're using a
> > version before beta5.
> >
> > (I'm getting VERY tired of saying this.)
> >
> > -jh-
> >
> > Steve Morris wrote:
> > >
> > > I'm having difficulty sending JDOM XML Documents to
> MQSeries
> > queues via Java
> > > Messaging Service (JMS).
> > >
> > > I have a javax.jms.ObjectMessage defined as...
> > >
> > > > ObjectMessage myMessage;
> > >
> > > When I try to call the its setObject method, providing
> my JDOM
> > Document as
> > > the argument...
> > >
> > > > myMessage.setObject(myDocument);
> > >
> > > JMS throws the following....
> > >
> > > > javax.jms.MessageFormatException:
> > > > MQJMS1060: Unable to serialize object
> > >
> > > Here's a link to the javax.jms.ObjectMessage where
> > > setObject(java.io.Serializable object) is defined...
> > >
> > > >
> >
> http://java.sun.com/products/jms/javadoc-102a/javax/jms/Obj
> ectMessage.html
> > >
> > > Doesn't org.jdom.Document implement serializable?
> > > When I send other types of Objects such as...
> > >
> > > > String myString = "A String in an Object";
> > >
> > > > myMessage.setObject(myString);
> > >
> > > it works ok.
> > >
> > > What am I missing?
> > >
> > > Steviemo
> > >
> > > _______________________________________________
> > > To control your jdom-interest membership:
> > >
> >
> http://lists.denveronline.net/mailman/options/jdom-interest
> /yourad
> > dr at yourhost.com
> >
> > --__--__--
> >
> > Message: 11
> > Date: Tue, 17 Oct 2000 15:50:47 -0700
> > From: Alex Chaffee <guru at edamame.stinky.com>
> > To: Brad Morgan <Brad.Morgan at e-pubcorp.com>
> > Cc: jdom-interest at jdom.org
> > Reply-To: alex at jguru.com
> > Subject: [jdom-interest] PROPOSAL: Remove most
> constructors from
> > XMLOutputter (was round trip XML)
> >
> > On Tue, Oct 17, 2000 at 10:08:19AM -0600, Brad Morgan
> wrote:
> > > I agree with you on the constructor issue.  I think
> adding the new
> > > ones is the upwardly compatible thing to do, but I'm
> acceptable to
> > > removing all but the default as well.  Either change
> produces a more
> > > consistant interface.  The current set of constructors
> seems lacking
> > > in consistancy given the ways in which people are
> tending to use
> > > them (pick a constructor that almost does what you
> want, then fine
> > > tune with methods).
> >
> > I'd like to do this.  Can I have a straw poll on the
> following?
> >
> > Remove all constructors from XMLOutputter except for the
> > following. Please vote separately if you want to, say,
> +1 the () but
> > -1 the (XMLOutputter)
> >
> > 1. XMLOutputter()
> > 	preserve whitespace, don't add newlines or indents
> >
> > 2. XMLOutputter(XMLOutputter other)
> > 	copy properties from other
> >
> > 3. XMLOutputter(boolean pretty)
> > 	true: trim whitespace, add newlines and indents
> > 	false: trim whitespace, don't add newlines or indents
> >
> > Note that 2 is redundant with
> (XMLOutputter)other.clone(); I'm leaning
> > towards eliminating it too (even though I'm the one that
> wrote it :-)
> >
> > Note also that 3's "false" is for the "compactest"
> output; I figure
> > that's a common enough use case that there should be a
> way to specify
> > it in the constructor.
> >
> > Please see JavaDoc for the current confusing set of
> constructors, and
> > for all the properties you can set (proving it's
> unfeasible to set all
> > of them in the constructor):
> >
> http://www.jdom.org/docs/apidocs/org/jdom/output/XMLOutputt
> er.html
> >
> >  - Alex
> >
> > --
> > Alex Chaffee                       mailto:alex at jguru.com
> > jGuru - Java News and FAQs        
> http://www.jguru.com/alex/
> > Creator of Gamelan                
> http://www.gamelan.com/
> > Founder of Purple Technology      
> http://www.purpletech.com/
> > Curator of Stinky Art Collective   http://www.stinky.com/
> >
> > --__--__--
> >
> > Message: 12
> > Date: Tue, 17 Oct 2000 16:44:21 -0700
> > From: Matt Magoffin <mmagoffin at proxicom.com>
> > Organization: Proxicom
> > To: jdom-interest at jdom.org
> > Subject: [jdom-interest] re: beta-5 woes
> >
> > I'm having the same DOCTYPE error with validation now
> that I moved to b5
> > from b4:
> >
> > Document root element "ObjectConfig", must match DOCTYPE
> root
> > "ObjectConfig".
> >         at java.lang.Throwable.<init>(Throwable.java:96)
> >         at java.lang.Exception.<init>(Exception.java:44)
> >         at
> org.jdom.JDOMException.<init>(JDOMException.java:98)
> >         at
> org.jdom.input.SAXBuilder.build(SAXBuilder.java:311)
> >         at
> org.jdom.input.SAXBuilder.build(SAXBuilder.java:442)
> >
> > I was using xerces 1.1.3, then grabbed 1.2.0 but am
> still having this
> > error. Any ideas why?
> >
> > --
> > : Matt Magoffin
> > : mmagoffin at proxicom.com
> >
> >
> >
> >
> > --__--__--
> >
> > _______________________________________________
> > To control your jdom-interest membership:
> >
> http://lists.denveronline.net/mailman/options/jdom-interest
> /yourad
> dr at yourhost.com
> 
> End of jdom-interest Digest
> 
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest
> /youraddr at yourhost.com
> 


More information about the jdom-interest mailing list