gf: github.com/gogf/gf/encoding/gxml Index | Files

package gxml

import "github.com/gogf/gf/encoding/gxml"

Package gxml provides accessing and converting for XML content.

Index

Package Files

gxml.go

func Decode Uses

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

Decode parses <content> into and returns as map.

func DecodeWithoutRoot Uses

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

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

func Encode Uses

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

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

func EncodeWithIndent Uses

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

Encode encodes map <m> to a XML format content as bytes with indent. The optional parameter <rootTag> is used to specify the XML root tag.

func ToJson Uses

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

ToJson converts <content> as XML format into JSON format bytes.

Package gxml imports 4 packages (graph) and is imported by 2 packages. Updated 2020-03-21. Refresh now. Tools for package owners.