Golang encoding/xml.Directive type example
package encoding/xml
A Directive represents an XML directive of the form . The bytes do not include the <! and > markers.
Golang encoding/xml.Directive type usage example
decoder := xml.NewDecoder(strings.NewReader(a.Answer))
token, _ := decoder.Token()
if token == nil {
break
}
switch tokentype := token.(type)
case xml.Directive:
fmt.Printf("<!")
fmt.Printf(token)
fmt.Printf(">")
Reference :
Advertisement
Something interesting
Tutorials
+8.9k Golang : Find network service name from given port and protocol
+5.4k Golang : What is StructTag and how to get StructTag's value?
+5.2k Golang : Customize scanner.Scanner to treat dash as part of identifier
+6.7k Golang : When to use make or new?
+11k How to test Facebook App on localhost ?
+6.8k Unix/Linux : How to fix CentOS yum duplicate glibc or device-mapper-libs dependency error?
+8.7k Golang : Find duplicate files with filepath.Walk
+21.8k SSL : How to check if current certificate is sha1 or sha2
+9.6k Golang : Read file with ioutil
+7.1k Golang : A simple forex opportunities scanner
+55.3k Golang : Unmarshal JSON from http response
+26.8k Golang : Convert file content into array of bytes