[cl-xmlspam-devel] Problem with parsing xmlns="http://...." attributes

roger peppe rogpeppe at gmail.com
Wed May 19 14:48:43 UTC 2010


hi,
this looks like it's caused by a bug (feature?) of
the cxml klacks parser. when it finds an attribute
with the name"xmlns" the klacks:map-attributes
function calls its argument with a nil name.

i've fixed my version, and it seems to work ok.
now i just have to remember how to upload to common-lisp.net!

i've attached the modified xspam.lisp

cheers,
  rog.

PS. feel free to give any more feedback or questions.

On 29 April 2010 09:27, Pavel G. Koukoushkin <k.pavel.g at gmail.com> wrote:
> Hi!
>
> I found the problem. When I try to parse such xml:
>
> <booking id="..." ...>
> <GetAgreementCredentialsResponse>
> <credentials agencyId="123" xmlns="http://....">
>
> with this code
>
> (defun extract-agency-data (data)
>  (with-xspam-soap-body data
>    (element :|GetAgreementCredentialsResponse|
>             (element :|GetAgreementCredentialsResult|
>                      (element :|credentials|
>                               (attribute "agencyId"
>                                 _))))))
>
> And it crashes, because nil is passed to make-qname0 to second
> argument (it must be attribute name)
>
> --
> С уважением, Кукушкин Павел.
> Программист ООО "Ехать"
>
> _______________________________________________
> cl-xmlspam-devel mailing list
> cl-xmlspam-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/cl-xmlspam-devel
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xspam.lisp
Type: application/octet-stream
Size: 22408 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cl-xmlspam-devel/attachments/20100519/ec8bdeae/attachment.obj>


More information about the cl-xmlspam-devel mailing list