27 #include "../../xml/Reader.h"
28 #include "../../xml/Writer.h"
29 #include "../../xsd/Attribute.h"
51 if(pos != std::string::npos)
52 attribute->setDefault(
new std::string(reader.
getAttr(pos)));
56 if(pos != std::string::npos)
57 attribute->setFixed(
new std::string(reader.
getAttr(pos)));
61 if(pos != std::string::npos)
66 if(pos != std::string::npos)
67 attribute->setName(
new std::string(reader.
getAttr(pos)));
71 if(pos != std::string::npos)
76 if(pos != std::string::npos)
81 if(pos != std::string::npos)
83 std::string value = reader.
getAttr(pos);
86 attribute->setUse(use);
103 return attribute.release();
It indicates that the attribute attribute is not required to be qualified with the namespace prefix a...
It indicates that the attribute cannot be used.
It indicates that the attribute use is required.
It indicates that the attribute attribute must be qualified with the namespace prefix and the no-colo...
This class models a XML reader object.
virtual bool next()=0
It gets the next event to be read.
void ReadAnnotated(te::xsd::Annotated *annotated, te::xml::Reader &reader)
TESERIALIZATIONEXPORT void Save(const te::fe::Filter *filter, te::xml::Writer &writer)
void ReadIdentifiable(te::xsd::Identifiable *identifiable, te::xml::Reader &reader)
It models a XML Schema attribute.
Support for Attribute serialization.
Support for SimpleType serialization.
te::xsd::QName * CreateQName(const std::string &name)
TESERIALIZATIONEXPORT te::xsd::Attribute * ReadAttribute(te::xml::Reader &reader)
AttributeUse
It specifies how the attribute is used.
It indicates that the attribute use is optional. This is the default.
Utility methods for Schema serialization.
virtual NodeType getNodeType() const =0
It return the type of node read.
virtual std::string getElementLocalName() const =0
It returns the local part of the element name in the case of an element node.
TESERIALIZATIONEXPORT te::xsd::SimpleType * ReadSimpleType(te::xml::Reader &reader)
virtual std::size_t getAttrPosition(const std::string &name) const =0
It returns the attribute position.
virtual std::string getAttr(const std::string &name) const =0
It returns the attribute value in the case of an element node with valid attributes.
This class models a XML writer object.