add a note document with examples for traversing suds library's data model
This commit is contained in:
parent
a91f233cf8
commit
56e4ff5c28
|
@ -0,0 +1,28 @@
|
|||
================================================
|
||||
Examples on traversing suds library's data model
|
||||
================================================
|
||||
:Authors: Jurko Gospodnetiæ
|
||||
:Date: 2014-01-23
|
||||
|
||||
Get service from client::
|
||||
|
||||
service = client.service
|
||||
|
||||
Get client from service (for debugging purposes only)::
|
||||
|
||||
client = service._ServiceSelector__client
|
||||
|
||||
Get XSD schema information from client::
|
||||
|
||||
schema = client.wsdl.schema
|
||||
schema.root # root schema XML element
|
||||
schema.all # all of the schema's imported direct child objects (model)
|
||||
schema.children # all of the schema's direct child objects (model)
|
||||
schema.elements # (name, namespace) --> top level element mapping (model)
|
||||
schema.types # (name, namespace) --> top level type mapping (model)
|
||||
|
||||
|
||||
Get XSD schema model object's direct children (i.e. elements, sequences,
|
||||
choices, etc.)::
|
||||
|
||||
schema_object.rawchildren
|
Loading…
Reference in New Issue