Back to godoc.org
github.com/gogf/gf/encoding/gxml

package gxml

v1.13.0
Latest Go to latest
Published: May 18, 2020 | License: MIT | Module: github.com/gogf/gf

Overview

Package gxml provides accessing and converting for XML content.

Index

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 a 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)

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

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

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

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier