| 585 | /************************************************************************/ |
| 586 | |
| 587 | static char *CPLLoadSchemaStr(const char *pszXSDFilename) |
| 588 | { |
| 589 | #ifdef HAS_VALIDATION_BUG |
| 590 | CPLHasLibXMLBug(); |
| 591 | #endif |
| 592 | |
| 593 | CPLHashSet *hSetSchemas = |
| 594 | CPLHashSetNew(CPLHashSetHashStr, CPLHashSetEqualStr, CPLFree); |
| 595 | CPLXMLNode *psSchema = |
| 596 | CPLLoadSchemaStrInternal(hSetSchemas, pszXSDFilename); |
| 597 | |
| 598 | char *pszStr = nullptr; |
| 599 | if (psSchema) |
| 600 | { |
| 601 | CPLMoveImportAtBeginning(psSchema); |
| 602 | pszStr = CPLSerializeXMLTree(psSchema); |
| 603 | CPLDestroyXMLNode(psSchema); |
| 604 | } |
| 605 | CPLHashSetDestroy(hSetSchemas); |
| 606 | return pszStr; |
| 607 | } |
| 608 | |
| 609 | /************************************************************************/ |
| 610 | /* CPLFindLocalXSD() */ |
no test coverage detected