Skip to content

attributes are not correctly marshaled #24

@3052

Description

@3052
package main

import (
   "encoding/xml"
   "os"
   nbio "github.com/nbio/xml"
)

func main() {
   var envelope struct {
      XMLName xml.Name `xml:"soap:Envelope"`
      Soap    string   `xml:"xmlns:soap,attr"`
   }
   // <soap:Envelope soap=""></soap:Envelope>
   nbio.NewEncoder(os.Stdout).Encode(envelope)
   // <soap:Envelope xmlns:soap=""></soap:Envelope>
   xml.NewEncoder(os.Stdout).Encode(envelope)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions