-
jonas’
\o/
-
jonas’
marc, the point of XSO is that you can map XML constructs to Python attributes / objects
-
marc
jonas’: yep, that's what I thought but I hab a damn typo and it didn't work :)
-
jonas’
:)
-
marc
jonas’: I guess I nees to register my classes such that they are decoded, right?
-
jonas’
if you’re using connect_xmlstream and send_and_wait_for, passing them to send_and_wait_for is all you need
-
jonas’
oh wow, send_and_wait_for has zero documentation
-
marc
Any special case for pre auth / stream elements?
-
jonas’
no
-
jonas’
send_and_wait_for is exactly for that
-
jonas’
first argument is the xmlstream, second argument is an iterable of XSOs you want to send, third argument is a sequence of XSO classes to listen for
-
jonas’
https://github.com/horazont/aioxmpp/blob/548dff57f878995262a861ee9530191afbdedd53/aioxmpp/protocol.py#L816
-
jonas’
also, feel free to file an issue for the lack of documentation of that function
-
jonas’
I’m @work, otherwise I’d fix that right away
-
marc
Okay, strange because it throws me an error that the element is unknown
-
marc
But I have to double check later
-
jonas’
you sure that your TAG is correct and you passed the right XSO?
-
marc
No, I'll check that later, thanks a lot so far!
-
marc
jonas’, What is the way to go when I want to have an Object that can contain different xml payloads?
-
marc
Do I need to inherit from a base class and specify the payload they in the child class or is it possible to use arbitrary child elements?
-
jonas’
marc, do you know the payloads beforehand?
-
jonas’
if so, xso.Child([...]) or xso.ChildList([...]) are good starting points
-
jonas’
(the possible payloads, you don’t need to know the specific payload)
-
jonas’
the list passed there is a list of XSO classes
-
jonas’
though we should move this to jdev@ or aioxmpp@
-
marc
Yep, can you send me the aioxmpp link?
-
jonas’
xmpp:aioxmpp@conference.zombofant.net?join
-
jose
andy
-
Guus
barbara
-
edhelas
john
-
Zash
greg
-
Guus
The first two contestants are out of our annual "names with the letter 'a'" competition!
-
!XSF_Martin
/me
-
Maranda
/them