Overview
- Skill Key
- datadrivenconstruction/xml-reader
- Author
- datadrivenconstruction
- Source Repo
- openclaw/skills
- Version
- -
- Source Path
- skills/datadrivenconstruction/xml-reader
- Latest Commit SHA
- 5b6b9eb59b71de8efa2c2834930a140f950c60f1
Read and parse XML from construction systems - P6 schedules, BSDD exports, IFC-XML, COBie-XML. Convert to pandas DataFrames.
Stars
0
Installs
0
Status
ACTIVE
Visibility
PUBLIC
直接复制以下提示词,发送给你的 AI 助手即可完成安装。
请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 xml-reader 技能。 若已安装,则直接安装 xml-reader 技能。
# XML Reader for Construction Data
## Overview
XML is used in construction for P6 schedules (XER), IFC-XML, COBie-XML, and buildingSMART Data Dictionary exports. This skill parses XML and converts to structured DataFrames.
## Python Implementation
```python
import xml.etree.ElementTree as ET
import pandas as pd
from typing import Dict, Any, List, Optional, Union
from dataclasses import dataclass
from pathlib import Path
import re
@dataclass
class XMLElement:
"""Parsed XML element."""
tag: str
attributes: Dict[str, str]
text: Optional[str]
children: List['XMLElement']
class ConstructionXMLReader:
"""Parse XML from construction systems."""
def __init__(self):
self.namespaces: Dict[str, str] = {}
def parse_file(self, file_path: str) -> ET.Element:
"""Parse XML file and return root element."""
tree = ET.parse(file_path)
root = tree.getroot()
# Extract namespaces
self._extract_namespaces(root)
return root
def parse_string(self, xml_string: str) -> ET.Element:
"""Parse XML from string."""
root = ET.fromstring(xml_string)
self._extract_namespaces(root)
return root
def _extract_namespaces(self, root: ET.Element):
"""Extract namespace mappings."""
# Find namespace declarations
for attr, value in root.attrib.items():
if attr.startswith('{'):
ns = attr[1:attr.index('}')]
self.namespaces[root.tag.split('}')[0][1:]] = ns
def find_elements(self, root: ET.Element,
tag: str,
namespace: str = None) -> List[ET.Element]:
"""Find all elements with given tag."""
if namespace:
tag = f"{{{namespace}}}{tag}"
return root.findall(f".//{tag}")
def element_to_dict(self, element: ET.Element,
include_children: bool...
openstockdata
OpenClaw Skill for stock data analysis
capt-marbles
Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discoverability and citation.
capgoblin
Access unsecured credit lines for AI agents on the Arc Network using the Credex Protocol. Use for borrowing USDC against reputation, repaying debt to grow credit limits, providing liquidity as an LP, or managing cross-chain USDC via Circle Bridge. Triggers on "borrow from credex", "repay debt", "deposit to pool", "check credit status", "provide liquidity", or any credit/lending task on Arc.
capt-marbles
Control PhantomBuster automation agents via API. List agents, launch automations, get output/results, check status, and abort running agents. Use when the user needs to run LinkedIn scraping, Twitter automation, lead generation phantoms, or any PhantomBuster workflow.
camelsprout
DuckDB CLI specialist for SQL analysis, data processing and file conversion. Use for SQL queries, CSV/Parquet/JSON analysis, database queries, or data conversion. Triggers on "duckdb", "sql", "query", "data analysis", "parquet", "convert data".
camohiddendj
DuckDuckGo HTML search scraper CLI with JSON, CSV, OpenSearch, markdown, and compact outputs.