[xml] Getting complextype name and datatype from XML Schema


If I got a XML document with XML Schema defined for it, is it possible for a given node in the XML document to get the complexType name (if existing) the node belongs to and the datatype for the node?

I.e, if I got a ”title” node in a document, which is defined in the XML Schema to be part of the complexType below, I want to get that ”title” is part of the complexType ”elementType” and of datatype ”xs:string”.


  <xs:complexType name="elementType">


      <xs:extension base="xs:string">

        <xs:attribute ref="xml:lang" use="optional"/>






Is this possible with libxml2? (Using the Python bindings)





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]