Package dev.frostlake.executor.copy
Class XmlStageReader
java.lang.Object
dev.frostlake.executor.copy.XmlStageReader
- All Implemented Interfaces:
StageFileReader
XML staged-file reader (JDK DOM — no external dependency). The document is loaded into a VARIANT-shaped
JsonNode: one record per file, keyed by the root element name (Snowflake's default, which keeps
the outer element). Attributes become @name fields, repeated child elements become arrays, and a
text-only element becomes a scalar. External entities and DOCTYPEs are disabled (XXE hardening).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe FILE_FORMAT TYPE this reader handles (e.g.List<tools.jackson.databind.JsonNode> readRecords(Path file) Parsefileinto its records.
-
Constructor Details
-
XmlStageReader
public XmlStageReader()
-
-
Method Details
-
readRecords
Description copied from interface:StageFileReaderParsefileinto its records. An unreadable/malformed file throws (a bad load is never silent).- Specified by:
readRecordsin interfaceStageFileReader- Throws:
IOException
-
formatType
Description copied from interface:StageFileReaderThe FILE_FORMAT TYPE this reader handles (e.g."JSON"), matched case-insensitively.- Specified by:
formatTypein interfaceStageFileReader
-