aws-sdk-go: github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil Index | Files

package xmlutil

import "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil"

Package xmlutil provides XML serialization of AWS requests and responses.

Index

Package Files

build.go sort.go unmarshal.go xml_to_struct.go

func BuildXML Uses

func BuildXML(params interface{}, e *xml.Encoder) error

BuildXML will serialize params into an xml.Encoder. Error will be returned if the serialization of any of the params or nested values fails.

func StructToXML Uses

func StructToXML(e *xml.Encoder, node *XMLNode, sorted bool) error

StructToXML writes an XMLNode to a xml.Encoder as tokens.

func UnmarshalXML Uses

func UnmarshalXML(v interface{}, d *xml.Decoder, wrapper string) error

UnmarshalXML deserializes an xml.Decoder into the container v. V needs to match the shape of the XML expected to be decoded. If the shape doesn't match unmarshaling will fail.

func UnmarshalXMLError Uses

func UnmarshalXMLError(v interface{}, stream io.Reader) error

UnmarshalXMLError unmarshals the XML error from the stream into the value type specified. The value must be a pointer. If the message fails to unmarshal, the message content will be included in the returned error as a awserr.UnmarshalError.

type XMLNode Uses

type XMLNode struct {
    Name     xml.Name              `json:",omitempty"`
    Children map[string][]*XMLNode `json:",omitempty"`
    Text     string                `json:",omitempty"`
    Attr     []xml.Attr            `json:",omitempty"`
    // contains filtered or unexported fields
}

A XMLNode contains the values to be encoded or decoded.

func NewXMLElement Uses

func NewXMLElement(name xml.Name) *XMLNode

NewXMLElement returns a pointer to a new XMLNode initialized to default values.

func XMLToStruct Uses

func XMLToStruct(d *xml.Decoder, s *xml.StartElement) (*XMLNode, error)

XMLToStruct converts a xml.Decoder stream to XMLNode with nested values.

func (*XMLNode) AddChild Uses

func (n *XMLNode) AddChild(child *XMLNode)

AddChild adds child to the XMLNode.

Package xmlutil imports 12 packages (graph) and is imported by 225 packages. Updated 2019-09-27. Refresh now. Tools for package owners.