Я анализирую файл XSD, и во время анализа происходит странное явление. Например, у меня есть этот элемент:
Код: Выделить всё
This is the description
4
Код: Выделить всё
#xml.etree.ElementTree
annotation = element.find(".//xsd:annotation", namespace)
if annotation is not None:
documentation = annotation.find(".//xsd:documentation", namespace)
if documentation is not None:
for doc_child in documentation:
tag = doc_child.tag.split('}')[-1]
element_dict[element_name][tag] = doc_child.text.strip()
Код: Выделить всё
Description: This is the description
LineNumber: 4
Код: Выделить всё
Description: This is the description
LineNumber: Part A Line 12
Подробнее здесь: https://stackoverflow.com/questions/792 ... ne-numbers