gxml

package
v2.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2022 License: MIT Imports: 5 Imported by: 12

Documentation

Overview

Package gxml provides accessing and converting for XML content.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(content []byte) (map[string]interface{}, error)

Decode parses `content` into and returns as map.

func DecodeWithoutRoot

func DecodeWithoutRoot(content []byte) (map[string]interface{}, error)

DecodeWithoutRoot parses `content` into a map, and returns the map without root level.

func Encode

func Encode(m map[string]interface{}, rootTag ...string) ([]byte, error)

Encode encodes map `m` to an XML format content as bytes. The optional parameter `rootTag` is used to specify the XML root tag.

func EncodeWithIndent

func EncodeWithIndent(m map[string]interface{}, rootTag ...string) ([]byte, error)

EncodeWithIndent encodes map `m` to an XML format content as bytes with indent. The optional parameter `rootTag` is used to specify the XML root tag.

func ToJson

func ToJson(content []byte) ([]byte, error)

ToJson converts `content` as XML format into JSON format bytes.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL