MCPcopy Create free account
hub / github.com/sissaschool/xmlschema / fromsource

Method fromsource

xmlschema/dataobjects.py:452–459  ·  view source on GitHub ↗
(cls, source: Union[XMLSourceType, XMLResource],
                   allow: str = 'all', defuse: str = 'remote',
                   timeout: int = 300, **kwargs: Any)

Source from the content-addressed store, hash-verified

450 cls.namespace = cls.xsd_element.target_namespace
451
452 def fromsource(cls, source: Union[XMLSourceType, XMLResource],
453 allow: str = 'all', defuse: str = 'remote',
454 timeout: int = 300, **kwargs: Any) -> DecodeType[Any]:
455 if not isinstance(source, XMLResource):
456 source = XMLResource(source, allow=allow, defuse=defuse, timeout=timeout)
457 if 'converter' not in kwargs:
458 kwargs['converter'] = DataBindingConverter
459 return cls.xsd_element.schema.decode(source, **kwargs)
460
461
462class DataElementConverter(XMLSchemaConverter):

Callers 3

test_bindings_moduleMethod · 0.80
test_schema_bindingsMethod · 0.80

Calls 2

XMLResourceClass · 0.90
decodeMethod · 0.45

Tested by 2

test_bindings_moduleMethod · 0.64
test_schema_bindingsMethod · 0.64