Not to nudge too much into the inner working fo you
project, but it seems too me like you have a character
encoding issue. I've had these types of issue using
other languages. Usually they steam from an into put
source that is not encoding the file properly for OS
platform. 

My first question would are you running this project
on multiple platforms? (Linux, Solaris, NT, etc.) 
If so if make your code has proper checks on the files
encoding. These squares look to me be like carriage
returns.  

I would also check to see if all your developers IDE
and editors are set to save is the same encoding
format.(ISO-8859-1, UTF-8, etc.) Try insert a new xml
document from your system into the DB and then
retrieve it. It help to see if it's just your machine
out of sync with the DB's encoding.

Also, earlier I posted ( email title:  A Solution to a
few XML result set problems) sample class that
retrives nodes from getContentAsDOM method and returns
it as a DOM Document, DOM4J Document, or as a UTF
string. You might want to take a look and see if it
will help your project.  

I'm sorry I could not be more help.

Cheers,
Evan
--- Josema Alonso <[EMAIL PROTECTED]> wrote:
> I've been also folowing the thread 'Problem with
> adding DOM node...', but
> none of the suggested solutions work for me. I've
> tried JDom and it makes
> things a bit better, but still do not work. You know
> why? I'm absolutely
> sure it is because of thos weird characters I
> mentioned earlier. I've
> attached a small image (hope you don't mind) where
> you can see a screen
> fragment of the variables window in WADS, reflecting
> the 'data' variable. It
> is filled with the value got from the DB right after
> a typical
> 'res.getContent()'...I guess it has something to do
> with encoding?!?!?
> 
> When using DOM, parsing stops exactly when one of
> those weird characters is
> found, but it doesn't trow an exception.
> With JDOM it goes 'til the end of the String, but
> creates a new node for
> everyone of those characters.
> 
> Oh, God, I'm desperate, I decided to use a native
> XML DB for this project
> cause I thought things would be easier this way, and
> things are getting
> worse indeed....
> 
> Thanks for listening and helping :-)
> 
> 
> ----- Original Message -----
> From: "Josema Alonso" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Tuesday, November 12, 2002 9:03 PM
> Subject: Re: how to get rid of the xml declaration
> on results?
> 
> 
> > > u can send an example of ur cleaned XML
> document?
> > Of course, below is the produced xml string right
> before making the call
> to
> > the parse method, I don't see anything relevant.
> > But...I'm using Websphere Developer to debug the
> application and I can see
> > in the variables inspector that there are some
> weird characters in between
> > the xml tags, i.e., something like this:
> > ...</EquipmentType>##<EquipmentType>....
> >
> > The # characters are not actually #, but something
> different, like a tiny
> > square...I'll try to analyze the String with Java
> and see what I can get.
> >
> > Thanks.
> >
> > ----------
> > <EquipmentTypes>
> >  <EquipmentType id="player" >
> >   <Description lang="en">Player</Description>
> >   <Description lang="es">Reproductor</Description>
> >  </EquipmentType>
> >  <EquipmentType id="preamp" >
> >   <Description
> lang="en">Preamplifier</Description>
> >   <Description
> lang="es">Preamplificador</Description>
> >  </EquipmentType>
> >  <EquipmentType id="recorder" >
> >   <Description lang="en">Recorder</Description>
> >   <Description lang="es">Grabadora</Description>
> >  </EquipmentType>
> > </EquipmentTypes>
> >
> >
> 

> ATTACHMENT part 2 image/png
name=weird_text_value.png


Reply via email to