Skip to content

invalid tag namespace #4

@3052

Description

@3052
package main

import (
   "encoding/xml"
   "fmt"
   "github.com/mantyr/xmlutils"
)

const data = `<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"></soap:Envelope>`

func main() {
   var envelope struct {
      XMLName xml.Name
      Soap string `xml:"xmlns:soap,attr"`
   }
   xmlutils.Unmarshal([]byte(data), &envelope)
   // {XMLName:{Space:http://schemas.xmlsoap.org/soap/envelope/ Local:Envelope}
   // Soap:http://schemas.xmlsoap.org/soap/envelope/}
   fmt.Printf("%+v\n", envelope)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions