{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# XML File Parser" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import os\n", "os.environ['CIMG_CIM_PROFILE'] = 'cimhub_2023'\n", "import cimgraph.data_profile.cimhub_2023 as cim" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "File test_incremental.xml not found. Defaulting to empty network graph\n" ] } ], "source": [ "from cimgraph.databases import XMLFile\n", "file = XMLFile(filename='test_incremental.xml')" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "No root element found in XML file\n" ] } ], "source": [ "from cimgraph.models import FeederModel\n", "network = FeederModel(container=cim.Feeder(), connection=file)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [] } ], "metadata": { "kernelspec": { "display_name": ".venv", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.12" } }, "nbformat": 4, "nbformat_minor": 2 }