Documentation
¶
Index ¶
- func AddElement(path string, parentElement string, newElement string, value string) error
- func CreateXMLFile(path string, rootElement string) error
- func DeleteElement(path string, elementName string) error
- func ExtractElementValue(xmlStr, elementName string) (string, error)
- func MarshalXML(v any, indent bool) ([]byte, error)
- func ReadXMLFile(path string) ([]byte, error)
- func UnmarshalXML(data []byte, v any) error
- func UpdateElement(path string, elementName string, newValue string) error
- func WriteXMLFile(path string, v any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddElement ¶
AddElement adds a new element to an XML file
func CreateXMLFile ¶
CreateXMLFile creates a new XML file with the given root element.
func DeleteElement ¶
DeleteElement removes an XML element from a file
func ExtractElementValue ¶
ExtractElementValue extracts the text content of a specified XML element.
func MarshalXML ¶
MarshalXML marshals a struct into an XML byte slice.
func ReadXMLFile ¶
ReadXMLFile reads an XML file and returns its contents as a byte slice.
func UnmarshalXML ¶
UnmarshalXML unmarshals XML data into a provided struct.
func UpdateElement ¶
UpdateElement modifies the value of an XML element in a file
func WriteXMLFile ¶
WriteXMLFile writes XML data to a file with indentation.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.