MCPcopy Create free account
hub / github.com/Alibaba-NLP/DeepResearch / parse_xml

Function parse_xml

inference/file_tools/file_parser.py:442–450  ·  view source on GitHub ↗
(file_path: str)

Source from the content-addressed store, hash-verified

440
441
442def parse_xml(file_path: str) -> List[dict]:
443 with open(file_path, 'r', encoding='utf-8') as f:
444 text = f.read()
445 if count_tokens(text) > DEFAULT_MAX_INPUT_TOKENS:
446 schema = extract_xml_skeleton_markdown(file_path)
447 content = [{'schema': schema}]
448 else:
449 content = [{'text': text}]
450 return [{'page_num': 1, 'content': content}]
451
452
453def compress(results: list) -> list[str]:

Callers

nothing calls this directly

Calls 2

count_tokensFunction · 0.90

Tested by

no test coverage detected