26 lines
1.3 KiB
Markdown
26 lines
1.3 KiB
Markdown
|
|
---
|
||
|
|
source_files:
|
||
|
|
- Common/DTS.Common/XMLUtils/DTSXMLFile.cs
|
||
|
|
- Common/DTS.Common/XMLUtils/NullableElement.cs
|
||
|
|
- Common/DTS.Common/XMLUtils/TestMetadataXml.cs
|
||
|
|
generated_at: "2026-04-17T16:25:04.256364+00:00"
|
||
|
|
model: "zai-org/GLM-5-FP8"
|
||
|
|
schema_version: 1
|
||
|
|
sha256: "01efb5962c95d1a4"
|
||
|
|
---
|
||
|
|
|
||
|
|
# XMLUtils
|
||
|
|
|
||
|
|
### Purpose
|
||
|
|
This module provides utility classes for handling XML data specific to the DTS system. It includes helpers for reading XML files with specific DTS metadata structures, a generic wrapper for serializing nullable types without standard `xsi:nil` attributes, and a parser for aggregating test metadata from multiple files.
|
||
|
|
|
||
|
|
### Public Interface
|
||
|
|
|
||
|
|
**`static class DTSXMLFile`**
|
||
|
|
* `double GetItemsToCompleteCount(string fileName)`: Reads an XML file specified by `fileName` and extracts the `TotalItems` attribute from the root node. Returns `0.0` if the attribute is missing or an error occurs.
|
||
|
|
* `string GetInnerXML(XmlReader reader)`: Reads the inner text of an XML element using the provided `XmlReader`. Throws `ArgumentException` if the reader is null.
|
||
|
|
|
||
|
|
**`class NullableElement<T>`**
|
||
|
|
* `NullableElement()`: Initializes a new instance with no value (`HasValue` is false).
|
||
|
|
* `NullableElement(T value)`: Initializes a new instance with the specified value.
|
||
|
|
* `
|