Golang encoding/xml.ProcInst type example

package encoding/xml

A ProcInst represents an XML processing instruction of the form

Golang encoding/xml.ProcInst type usage example

  ...
  switch tokentype := token.(type) {
 case CharData:
 EscapeText(p, token)
 case xml.ProcInst:
 p.WriteString("<?" + token.Target + " ")
 p.Write(token.Inst)
 p.WriteString("?>")
  ...

Reference :

http://golang.org/pkg/encoding/xml/#ProcInst

Advertisement