nested_element() — langchain Function Reference
Architecture documentation for the nested_element() function in xml.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD c299c424_1e24_5191_e410_3eb80554e7d0["nested_element()"] f90cc11a_ee3a_6a74_4781_be7b69a7ed22["xml.py"] c299c424_1e24_5191_e410_3eb80554e7d0 -->|defined in| f90cc11a_ee3a_6a74_4781_be7b69a7ed22 e9426db7_ce58_59db_1f0b_befb5eb1d7ae["parse()"] e9426db7_ce58_59db_1f0b_befb5eb1d7ae -->|calls| c299c424_1e24_5191_e410_3eb80554e7d0 c299c424_1e24_5191_e410_3eb80554e7d0["nested_element()"] c299c424_1e24_5191_e410_3eb80554e7d0 -->|calls| c299c424_1e24_5191_e410_3eb80554e7d0 c299c424_1e24_5191_e410_3eb80554e7d0["nested_element()"] c299c424_1e24_5191_e410_3eb80554e7d0 -->|calls| c299c424_1e24_5191_e410_3eb80554e7d0 style c299c424_1e24_5191_e410_3eb80554e7d0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/output_parsers/xml.py lines 288–300
def nested_element(path: list[str], elem: ET.Element) -> Any:
"""Get nested element from path.
Args:
path: The path to the element.
elem: The element to extract.
Returns:
The nested element.
"""
if len(path) == 0:
return AddableDict({elem.tag: elem.text})
return AddableDict({path[0]: [nested_element(path[1:], elem)]})
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does nested_element() do?
nested_element() is a function in the langchain codebase, defined in libs/core/langchain_core/output_parsers/xml.py.
Where is nested_element() defined?
nested_element() is defined in libs/core/langchain_core/output_parsers/xml.py at line 288.
What does nested_element() call?
nested_element() calls 1 function(s): nested_element.
What calls nested_element()?
nested_element() is called by 2 function(s): nested_element, parse.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free