MCPcopy Create free account
hub / github.com/Kitware/VTK / StartElement

Method StartElement

IO/XMLParser/vtkXMLDataParser.cxx:143–170  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

141
142//------------------------------------------------------------------------------
143void vtkXMLDataParser::StartElement(const char* name, const char** atts)
144{
145 vtkXMLDataElement* element = vtkXMLDataElement::New();
146 element->SetName(name);
147 element->SetXMLByteIndex(this->GetXMLByteIndex());
148 vtkXMLUtilities::ReadElementFromAttributeArray(element, atts, this->AttributesEncoding);
149
150 const char* id = element->GetAttribute("id");
151 if (id)
152 {
153 element->SetId(id);
154 }
155 this->PushOpenElement(element);
156
157 if (strcmp(name, "AppendedData") == 0)
158 {
159 // This is the AppendedData element.
160 this->FindAppendedDataPosition();
161
162 // Switch to raw decoder if necessary.
163 const char* encoding = element->GetAttribute("encoding");
164 if (encoding && (strcmp(encoding, "raw") == 0))
165 {
166 this->AppendedDataStream->Delete();
167 this->AppendedDataStream = vtkInputStream::New();
168 }
169 }
170}
171
172//------------------------------------------------------------------------------
173void vtkXMLDataParser::SeekInlineDataPosition(vtkXMLDataElement* element)

Callers

nothing calls this directly

Calls 8

PushOpenElementMethod · 0.95
GetXMLByteIndexMethod · 0.80
DeleteMethod · 0.65
NewFunction · 0.50
SetNameMethod · 0.45
GetAttributeMethod · 0.45
SetIdMethod · 0.45

Tested by

no test coverage detected