| 196 | |
| 197 | |
| 198 | std::string XMLSchema::xml() const |
| 199 | { |
| 200 | xmlBuffer *b = xmlBufferCreate(); |
| 201 | xmlTextWriterPtr w = xmlNewTextWriterMemory(b, 0); |
| 202 | |
| 203 | xmlTextWriterSetIndent(w, 1); |
| 204 | xmlTextWriterStartDocument(w, NULL, "utf-8", NULL); |
| 205 | xmlTextWriterStartElementNS(w, (const xmlChar*)"pc", |
| 206 | (const xmlChar*)"PointCloudSchema", NULL); |
| 207 | xmlTextWriterWriteAttributeNS(w, (const xmlChar*) "xmlns", |
| 208 | (const xmlChar*)"pc", NULL, |
| 209 | (const xmlChar*)"http://pointcloud.org/schemas/PC/"); |
| 210 | xmlTextWriterWriteAttributeNS(w, (const xmlChar*)"xmlns", |
| 211 | (const xmlChar*)"xsi", NULL, |
| 212 | (const xmlChar*)"http://www.w3.org/2001/XMLSchema-instance"); |
| 213 | |
| 214 | writeXml(w); |
| 215 | |
| 216 | xmlTextWriterEndElement(w); |
| 217 | xmlTextWriterEndDocument(w); |
| 218 | |
| 219 | std::string output((const char *)b->content, b->use); |
| 220 | xmlFreeTextWriter(w); |
| 221 | xmlBufferFree(b); |
| 222 | |
| 223 | return output; |
| 224 | } |
| 225 | |
| 226 | |
| 227 | DimTypeList XMLSchema::dimTypes() const |
no outgoing calls
no test coverage detected