27 #include "../../xml/Reader.h"
28 #include "../../xml/Writer.h"
29 #include "../../xsd/All.h"
30 #include "../../xsd/Attribute.h"
31 #include "../../xsd/AttributeGroup.h"
32 #include "../../xsd/Choice.h"
33 #include "../../xsd/ComplexType.h"
34 #include "../../xsd/Group.h"
35 #include "../../xsd/Sequence.h"
66 if(pos != std::string::npos)
67 ct->setName(
new std::string(reader.
getAttr(pos)));
71 if(pos != std::string::npos)
72 ct->setAsAbstract(reader.
getAttr(pos) ==
"true" ?
true :
false);
76 if(pos != std::string::npos)
77 ct->setAsMixed(reader.
getAttr(pos) ==
"true" ?
true :
false);
89 std::set<std::string> children;
90 children.insert(
"simpleContent");
91 children.insert(
"complexContent");
92 children.insert(
"group");
93 children.insert(
"all");
94 children.insert(
"choice");
95 children.insert(
"sequence");
96 children.insert(
"attribute");
97 children.insert(
"attributeGroup");
98 children.insert(
"anyAttribute");
100 std::set<std::string>::iterator it;
104 std::string tag = *it;
105 if(tag ==
"simpleContent")
111 if(tag ==
"complexContent")
125 ct->setContent(
ReadAll(reader));
135 if(tag ==
"sequence")
141 if(tag ==
"attribute")
147 if(tag ==
"attributeGroup")
153 if(tag ==
"anyAttribute")
TESERIALIZATIONEXPORT te::xsd::SimpleContent * ReadSimpleContent(te::xml::Reader &reader)
TESERIALIZATIONEXPORT te::xsd::Sequence * ReadSequence(te::xml::Reader &reader)
This class models a XML reader object.
Support for SimpleContent serialization.
virtual bool next()=0
It gets the next event to be read.
void ReadAnnotated(te::xsd::Annotated *annotated, te::xml::Reader &reader)
It models a XML Schema Complex Type definition.
TESERIALIZATIONEXPORT te::xsd::ComplexContent * ReadComplexContent(te::xml::Reader &reader)
TESERIALIZATIONEXPORT te::xsd::Choice * ReadChoice(te::xml::Reader &reader)
TESERIALIZATIONEXPORT te::xsd::Group * ReadGroup(te::xml::Reader &reader)
TESERIALIZATIONEXPORT te::xsd::AnyAttribute * ReadAnyAttribute(te::xml::Reader &reader)
Support for ComplexContent serialization.
TESERIALIZATIONEXPORT void Save(const te::fe::Filter *filter, te::xml::Writer &writer)
void ReadIdentifiable(te::xsd::Identifiable *identifiable, te::xml::Reader &reader)
Support for Attribute serialization.
TESERIALIZATIONEXPORT te::xsd::Attribute * ReadAttribute(te::xml::Reader &reader)
TESERIALIZATIONEXPORT te::xsd::ComplexType * ReadComplexType(te::xml::Reader &reader)
Support for Choice serialization.
Support for AnyAttribute serialization.
Support for All serialization.
Utility methods for Schema serialization.
TESERIALIZATIONEXPORT te::xsd::All * ReadAll(te::xml::Reader &reader)
Support for Sequence serialization.
Support for ComplexType serialization.
virtual NodeType getNodeType() const =0
It return the type of node read.
TESERIALIZATIONEXPORT te::xsd::AttributeGroup * ReadAttributeGroup(te::xml::Reader &reader)
Support for AttributeGroup serialization.
virtual std::string getElementLocalName() const =0
It returns the local part of the element name in the case of an element node.
virtual std::size_t getAttrPosition(const std::string &name) const =0
It returns the attribute position.
Support for Group serialization.
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.