How to check for errors in the input XML when parsing with Go?
问题 I'm a beginner with golang, writing an XML parser. My goal is that would like to include checks for whether the xml file is formatted correctly, checking for missing brackets or misspelled words for elements and attributes. If there are missing brackets or misspelled words, the code could throw an exception informing users to correct the mistake. Let's take a concrete example of an xml file, example.xml : <?xml version="1.0" encoding="utf-8"?> <servers version="1"> <server> <model name="Cisco