Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/m29h/xml

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/m29h/xml

  • v1.0.1
  • Source
  • Go
  • Socket score

Version published
Created
Source

xml GoDoc Tests Coverage Status Go Report Card

Package github.com/m29h/xml implements a XML 1.0 marshaler that is a drop in encoding/xml replacement maintaining full interface compatibility to it but aims to producing C14N Exclusive XML Canonicalization compatible byte sequences. This includes sorting of all rendered element attributes as per the C14N-XML spec.

Example

A Struct defined in the normal way as known from encoding/xml

type Person struct {
	XMLName xml.Name `xml:"http://example.com/ns1 person"`
	Name    string   `xml:"name"`
	Phone   string   `xml:"http://example.com/ns2 phone,omitempty"`
}

is marshaled to

<ns1:person xmlns:ns1="http://example.com/ns1">
  <ns1:name>Foo</ns1:name>
  <ns2:phone xmlns:ns2="http://example.com/ns2">123</ns2:phone>
</ns1:person>

FAQs

Package last updated on 15 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc