Sample code for 30+ languages & platforms
Go

Load XML from Local FilePath

Demonstrates how to load XML from a local XML file.

Chilkat Go Downloads

Go
    success := false

    xml := chilkat.NewXml()

    // Pass either an absolute file path, or a file path relative from the current working directory of the caller.
    success = xml.LoadXmlFile("qa_data/hamlet.xml")
    if success == false {
        fmt.Println(xml.LastErrorText())
        xml.DisposeXml()
        return
    }

    fmt.Println("Success.")

    xml.DisposeXml()