XmlStructLoader.get_base_field_type
— Methodget_field_type(::Type{T}, field_specification::Union{Symbol, Int}) where T <: Any
For a given type T return the type of the field determined by either the index or symbol field_specification. If the type is a Union return the first type different from Nothing. This is intended to handle types of the pattern Union{Nothing, S} which is intended to represent optional types.
XmlStructLoader.getattributes_dict
— Methodgetattributes_dict(x::XMLElement)
Faster version of EzXML.attributes_dict()
XmlStructLoader.import_module_from_xml
— Methodimport_module_from_xml(xml_path::AbstractString, module_path::AbstractString)::Module
Import the module from the .jl files in the module_path and return a reference to this module. This reference can be passed into the load function.
Examples
julia> using XmlStructLoader
-julia> module_ref = import_module_from_xml(path/to/xml/file.xml, path/to/module/module.jl)
XmlStructLoader.load
— Methodload(xml_path::AbstractString, module_path::AbstractString; validate::Bool=true)
Load the given XML file into the structs defined in the given module and return the loaded struct. The module has to be generated by XsdToStruct.jl. By default the loader will validate if the data in the given XML conforms to the restrictions specified in the XSD. To skip this validation the keyword argument validate
can be set to false.
Examples
julia> using XmlStructLoader
-julia> load(joinpath("path", "to", "xml", "file.xml"), joinpath("path", "to", "xsd", "module.jl"))
XmlStructLoader.load
— Methodload(xml_path::AbstractString, module_ref::Module; validate::Bool=true)
Load the given XML file into the structs defined in the given module and return the loaded struct. The module has to be generated by XsdToStruct.jl. By default the loader will validate if the data in the given XML conforms to the restrictions specified in the XSD. To skip this validation the keyword argument validate
` can be set to false.
Examples
julia> using XmlStructLoader
+Docstrings · XmlStructLoader.jl XmlStructLoader.get_base_field_type
— Methodget_field_type(::Type{T}, field_specification::Union{Symbol, Int}) where T <: Any
For a given type T return the type of the field determined by either the index or symbol field_specification. If the type is a Union return the first type different from Nothing. This is intended to handle types of the pattern Union{Nothing, S} which is intended to represent optional types.
sourceXmlStructLoader.getattributes_dict
— Methodgetattributes_dict(x::XMLElement)
Faster version of EzXML.attributes_dict()
sourceXmlStructLoader.import_module_from_xml
— Methodimport_module_from_xml(xml_path::AbstractString, module_path::AbstractString)::Module
Import the module from the .jl files in the module_path and return a reference to this module. This reference can be passed into the load function.
Examples
julia> using XmlStructLoader
+julia> module_ref = import_module_from_xml(path/to/xml/file.xml, path/to/module/module.jl)
sourceXmlStructLoader.load
— Methodload(xml_path::AbstractString, module_path::AbstractString; validate::Bool=true)
Load the given XML file into the structs defined in the given module and return the loaded struct. The module has to be generated by XsdToStruct.jl. By default the loader will validate if the data in the given XML conforms to the restrictions specified in the XSD. To skip this validation the keyword argument validate
can be set to false.
Examples
julia> using XmlStructLoader
+julia> load(joinpath("path", "to", "xml", "file.xml"), joinpath("path", "to", "xsd", "module.jl"))
sourceXmlStructLoader.load
— Methodload(xml_path::AbstractString, module_ref::Module; validate::Bool=true)
Load the given XML file into the structs defined in the given module and return the loaded struct. The module has to be generated by XsdToStruct.jl. By default the loader will validate if the data in the given XML conforms to the restrictions specified in the XSD. To skip this validation the keyword argument validate
` can be set to false.
Examples
julia> using XmlStructLoader
julia> include(joinpath("path", "to", "xsd", "module.jl"))
julia> using .XsdModule
julia> load(joinpath("path", "to", "xml", "file.xml"), XsdModule)
or:
julia> using XmlStructLoader
@@ -10,5 +10,5 @@
julia> load(joinpath("path", "to", "xml", "file.xml"), XsdModule)
or to skip validation:
julia> using XmlStructLoader
julia> include(joinpath("path", "to", "xsd", "module.jl"))
julia> using .XsdModule
-julia> load(joinpath("path", "to", "xml", "file.xml"), XsdModule, validate=false)
sourceXmlStructLoader.type_in_module
— Method(type_in_module(::Type{T}, module_ref::Module)::Bool) where T <: Any
Determine if given type T is defined in the module specified by module_symbol.
sourceXmlStructLoader.type_in_module
— Methodtype_in_module(::Type{ZonedDateTime}, ::Module)
Handles special edge case that should always return false.
sourceXmlStructLoader.use_module_from_xml
— Methoduse_module_from_xml(xml_path::AbstractString, module_path::AbstractString)::Module
Use the module from the .jl files in the module_path and return a reference to this module. This reference can be passed into the load function.
Examples
julia> using XmlStructLoader
-julia> module_ref = use_module_from_xml(path/to/xml/file.xml, path/to/module/module.jl)
sourceSettings
This document was generated with Documenter.jl version 1.5.0 on Friday 19 July 2024. Using Julia version 1.10.4.
+julia> load(joinpath("path", "to", "xml", "file.xml"), XsdModule, validate=false)
XmlStructLoader.type_in_module
— Method(type_in_module(::Type{T}, module_ref::Module)::Bool) where T <: Any
Determine if given type T is defined in the module specified by module_symbol.
XmlStructLoader.type_in_module
— Methodtype_in_module(::Type{ZonedDateTime}, ::Module)
Handles special edge case that should always return false.
XmlStructLoader.use_module_from_xml
— Methoduse_module_from_xml(xml_path::AbstractString, module_path::AbstractString)::Module
Use the module from the .jl files in the module_path and return a reference to this module. This reference can be passed into the load function.
Examples
julia> using XmlStructLoader
+julia> module_ref = use_module_from_xml(path/to/xml/file.xml, path/to/module/module.jl)