# ConfigXml **Repository Path**: bobliu21/config-xml ## Basic Information - **Project Name**: ConfigXml - **Description**: 使用tinyxml2来简单的写了一个通用接口,用来作为read with default write back,感兴趣的可以直接拿来使用,有问题也可以及时沟通 - **Primary Language**: C++ - **License**: LGPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-10-24 - **Last Updated**: 2026-02-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ConfigXml A simple and easy-to-use XML configuration management component based on TinyXML2. ## Features - Provides a thread-safe singleton manager - Supports multiple instance management (identified by ID) - Automatically creates configuration path nodes - Supports reading, writing, deleting, and existence checking of configuration items - Supports loading and saving configuration files - Provides convenient string conversion templates ## Usage Instructions ### Create a Configuration Instance ```cpp int id = Bob::CreateInstance(); // Create a configuration instance ``` ### Load Configuration File ```cpp XmlHelper::read("configuration.path.configuration.item", default_value); // Read a configuration item ``` ### Save Configuration File ```cpp XmlHelper::write("configuration.path.configuration.item", value); // Write a configuration item ``` ### Configuration Operations ```cpp XmlHelper::exists("configuration.path.configuration.item"); // Check if a configuration item exists XmlHelper::remove("configuration.path.configuration.item"); // Delete a configuration item ``` ## Project Structure ``` ├── ConfigXml/ # Main implementation files ├── include/ # Header file directory │ └── tinyxml2/ # TinyXML2 third-party library ├── testdemo/ # Test example 1 └── testdemo2/ # Test example 2 ``` ## Dependencies - TinyXML2 library (included in the project) ## License This project is licensed under the MIT License. Please refer to the LICENSE file for details.