Subject | RE: [IBO] Problems with AsXml property |
---|---|
Author | Tom Munro Glass |
Post date | 2000-12-10T19:33:28Z |
Good point! I've looked at the XML spec and here are the important parts
that relate to tags:
STag ::= '<' Name (S Attribute)* S? '>'
NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar |
Extender
Name ::= (Letter | '_' | ':') (NameChar)*
Letter, Digit, CombiningChar & Extender are fully defined in the XML spec at
http://www.w3.org/TR/REC-xml
It looks like you are already modifying the fieldnames before using them as
tags, i.e. you convert them to lowercase, so maybe you could strip out any
illegal characters at the same time.
Another potential problem has just occurred to me - what happens about
special characters in the field's value, e.g. converting "&" to "&"
etc.?
Tom Munro Glass
that relate to tags:
STag ::= '<' Name (S Attribute)* S? '>'
NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar |
Extender
Name ::= (Letter | '_' | ':') (NameChar)*
Letter, Digit, CombiningChar & Extender are fully defined in the XML spec at
http://www.w3.org/TR/REC-xml
It looks like you are already modifying the fieldnames before using them as
tags, i.e. you convert them to lowercase, so maybe you could strip out any
illegal characters at the same time.
Another potential problem has just occurred to me - what happens about
special characters in the field's value, e.g. converting "&" to "&"
etc.?
Tom Munro Glass
> -----Original Message-----
> From: Jason Wharton [mailto:jwharton@...]
> Sent: Friday, December 08, 2000 3:23 PM
> To: IBObjects@egroups.com
> Subject: Re: [IBO] Problems with AsXml property
>
>
> What I need is the whole spec for XML condensed for me such
> that I can make
> this work as it should...
>
> I have a bit more to learn about XML...
>
> What if the column name included a quote? (Yes, it is possible).
>
> Jason Wharton
> CPS - Mesa AZ
> http://www.ibobjects.com
>
>
> ----- Original Message -----
> From: "Tom Munro Glass" <tom@...>
> To: <IBObjects@egroups.com>
> Sent: Thursday, December 07, 2000 7:10 PM
> Subject: [IBO] Problems with AsXml property
>
>
> > I'm experimenting with using the AsXml property of a query
> and have hit
> > problems with IB6 when using quoted fieldnames - the quotes
> are copied
> into
> > the Xml tags and this is illegal, e.g.
> <"fieldname">fieldvalue</"fieldname">
> > should be <fieldname>fieldvalue</fieldname>
> >
> > I can get round the problem by aliasing the fieldnames, but
> it would be
> > neater if the AsXml property automatically stripped the quotes.
> >
> > Jason, any chance of changing this in the next release?
> >
> > TIA.
> >
> > Tom Munro Glass
>
>
>
> -------------------------- eGroups Sponsor
> -------------------------~-~>
> eGroups eLerts
> It's Easy. It's Fun. Best of All, it's Free!
> http://click.egroups.com/1/9698/1/_/685810/_/976250893/
> --------------------------------------------------------------
> -------_->
>
>
>
>