skip to navigation
skip to content

Not Logged In

porteira 0.4

API responsible for validating XML structures and generate python structures.


API responsible for validating XML SciELO structures and generate python structures

API Usage

  1. The instance of porteira.Schema(xsd) parses and validates the time of construction instance
  2. Validating xml against an xsd, method: Schema.validate(xml) return boolean
  3. Deserialized XML to dict object, method: Schema.deserialize(xml) return dict
  4. Serialize dict to XML, method: Schema.serialize(dict) return XML
  5. Get_validation_errors return a list of syntax and schema errors otherwise empty list, method: Schema.get_validation_errors(xml) return list

Errors format returned from this method;


Ex.: [(PARSER, 3, 51, FATAL, ERR_TAG_NAME_MISMATCH, Opening and ending tag mismatch: statpage line 3 and startpage), (SCHEMASV, 2, 0, ERROR, SCHEMAV_CVC_ELT_1, Element 'wizard': No matching global declaration available for the validation root)]

File Type Py Version Uploaded on Size
porteira-0.4.tar.gz (md5) Source 2013-01-03 3KB
  • Downloads (All Versions):
  • 21 downloads in the last day
  • 135 downloads in the last week
  • 509 downloads in the last month