ReqObject#

class ansys.scade.pyalmgw.documents.ReqObject(owner: ReqObject | None)#

Top level class for Requirements Document.

Defines the interface for XML serialization and parsing.

Overview#

parse

Parse the current object from an XML element.

serialize

Add the element to the XML DOM.

attributes

Return the attributes to be serialized as a dictionary.

children

Return the contained elements to be serialized as a dictionary.

Import detail#

from ansys.scade.pyalmgw.documents import ReqObject

Property detail#

property ReqObject.attributes: Dict[str, str]#

Return the attributes to be serialized as a dictionary.

property ReqObject.children: Dict[str, List[List[ReqObject]]]#

Return the contained elements to be serialized as a dictionary.

The entries are indexed by their tag, and contain the lists of child elements.

Attribute detail#

ReqObject.ns#
ReqObject.owner#
ReqObject.scade_req_ns = 'http://www.esterel-technologies.com/scade/lifecycle/almgateway/scade_req/1'#
ReqObject.xml_tag = ''#

Method detail#

ReqObject.parse(elem: Any)#

Parse the current object from an XML element.

Parameters:
elemAny

XML element to parse.

ReqObject.serialize(parent=None) Any#

Add the element to the XML DOM.

Parameters:
parentAny

Parent element or None if the element to create is the root element.

Returns:
Any

Corresponding XML element.