MCPcopy Create free account
hub / github.com/MonaSolutions/MonaServer / parseXMLName

Method parseXMLName

MonaBase/sources/XMLParser.cpp:424–439  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

422
423
424const char* XMLParser::parseXMLName(const char* endMarkers, UInt32& size) {
425
426 if (!isalpha(*_current) && *_current!='_') {
427 _ex.set(Exception::FORMATTING, "XML name must start with an alphabetic character");
428 return NULL;
429 }
430 const char* name(_current++);
431 while (_current < _end && isxml(*_current))
432 ++_current;
433 size = (_current - name);
434 if (_current==_end || (!strchr(endMarkers,*_current) && !isspace(*_current))) {
435 _ex.set(Exception::FORMATTING, "XML name '",string(name,size),"' without termination");
436 return NULL;
437 }
438 return name;
439}
440
441} // namespace Mona

Callers

nothing calls this directly

Calls 4

isalphaFunction · 0.85
isxmlFunction · 0.85
isspaceFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected