Thanks.
----- Original Message -----
From: "David N Bertoni/Cambridge/IBM" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 02, 2003 5:06 PM
Subject: Re: Spaces in tag


>
>
>
>
> Nash,
>
> > I think you misunderstood my question from the beginning. The space that
> > I want to replace with %20 is not part of the tag or element name. It is
> the
> > space that separates the two.
>
> No, I didn't misunderstand your question -- you never said _anything_
about
> encoding XML as part of an HTTP query string.
>
> You cannot do this with DOMWriter without rewriting it, since what you're
> asking for is not a valid serialized representation of the DOM.  You
should
> just post-process the markup and replace all space characters yourself.
>
> Dave
>
>
>
>
>                       "Nash Kabbara"
>                       <[EMAIL PROTECTED]>         To:
<[EMAIL PROTECTED]>
>                                                cc:      (bcc: David N
Bertoni/Cambridge/IBM)
>                       01/02/2003 02:53         Subject: Re: Spaces in tag
>                       PM
>                       Please respond
>                       to xerces-c-dev
>

>
>
>
>     Sorry about the typos.
>     Thanks for you time.
>     I think you misunderstood my question from the beginning. The space
> that
> I want to replace with %20 is not part of the tag or element name. It is
> the
> space that separates the two.
>     When I send the xml string to a processor, it doesn't like the space
> between the tag name and the attribute name.
> The processor accept xml strings through a http get. So for testing
> purposes
> I cut the output from exerces and placed it in the Address field in
> Internet
> Explorer. IE automatically replaced the space with a %20.
>
> e.g.
>     I inserted this string in IE address
> field:http://blabla.com/process.asp?xml=<Transaction><Submition
> Number="1"></Submition></Transaction>
> So IE before submitting the request changed the string
>
to:http://blabla.com/process.asp?xml=<Transaction><Submition%20Number="1"></
>
> Submition></Transaction>
> And now the processor accepts the mutilated string.
>
> Can you explain this?
>
> ----- Original Message -----
> From: "David N Bertoni/Cambridge/IBM" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, January 02, 2003 4:23 PM
> Subject: Re: Spaces in tag
>
>
> >
> >
> >
> >
> > Nash,
> >
> > Aside from the typos in your output , it looks like the DOMWriter's
> output
> > is correct.  There _must_ be a space between the tag name and the name
of
> > the attribute.  Otherwise, how else could any XML processor determine
> where
> > the tag name ends and the attribute name begins?
> >
> > I think you need to get a good book on XML and do some reading before
you
> > start writing your code -- there are some fundamentals of XML that you
> > don't seem to understand.
> >
> > Dave
> >
> >
> >
> >
> >                       "Nash Kabbara"
> >                       <[EMAIL PROTECTED]>         To:
> <[EMAIL PROTECTED]>
> >                                                cc:      (bcc: David N
> Bertoni/Cambridge/IBM)
> >                       01/02/2003 01:13         Subject: Re: Spaces in
tag
> >                       PM
> >                       Please respond
> >                       to xerces-c-dev
> >
> >
> >
> >
> > Thanks Dave, but the output of my writer is producing a space between
the
> > tag name and the name of the attribute. How can I stop that. Here is a
> code
> > snippet.
> >
> > ...
> >
> > This is the ouputs
> > <Transation>
> >     <Submition Number="1"></Submition>
> > </Transaction>
> >
> > ----- Original Message -----
> > From: "David N Bertoni/Cambridge/IBM" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, January 02, 2003 3:00 PM
> > Subject: Re: Spaces in tag
> >
> >
> > >
> > >
> > >
> > >
> > > The space in your example is not part of the tag name, rather, it
> > separates
> > > the tag name from the name of the attribute.  Since tag names cannot
> > > contain spaces, you should never have to replace them.
> > >
> > > Dave
> > >
> > >
> > >
> > >
> > >                       "Nash Kabbara"
> > >                       <[EMAIL PROTECTED]>         To:
> > <[EMAIL PROTECTED]>
> > >                                                cc:      (bcc: David N
> > Bertoni/Cambridge/IBM)
> > >                       01/02/2003 12:57         Subject: Spaces in tag
> > >                       PM
> > >                       Please respond
> > >                       to xerces-c-dev
> > >
> > >
> > >
> > >
> > > Hi,
> > >     How can I replace spaces in tags with %20? for e.g.
> > >
> > > <root>
> > >     <elem1 attr="bla"></elem1>
> > > </root>
> > >
> > > TO
> > >
> > > <root>
> > >     <elem1%20attr="bla"></elem1>
> > > </root>
> > >
> > > I am using the DOM implementation.
> > > Thank you,
> > > Nash
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to