xxml

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

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

将XML内容解析为map变量

func Encode

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

将map变量解析为XML格式内容

func EncodeWithIndent

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

func MakeCloseKey

func MakeCloseKey(key string) string

func MakeOpenKey

func MakeOpenKey(key string) string

func ToJson

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

XML格式内容直接转换为JSON格式内容

func XmlFormat

func XmlFormat(val interface{}) interface{}

格式化基础数据类型

Types

type XmlStr

type XmlStr string

func MakeNode

func MakeNode(name string, val interface{}, indent int, props ...map[string]interface{}) XmlStr

生成xml节点

func (XmlStr) String

func (xs XmlStr) String() string

Jump to

Keyboard shortcuts

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