I want to unmarshal an xml data to a data structure. 
Problem is the following 
This xml comes from a Odata Server and has fields "edmx:Edmx".
How should the fields of struct be named? 
I observe that the fields name of struct representing xml should be the 
same name as xml field name. 
Now how one can define edmx:Edmx from xml to a field that xml packet of 
golang can parse it?

<edmx:Edmx Version="4.0" 
xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx";>
</edmx:Edmx>

type Metadata struct {
<???WHATFIELD NAME> xml.Name `xml:"edmx:Edmx"`
<???WHAT FIELD NAME>    string `xml:"xmlns:edmx,attr"`
Version string `xml:"Version,attr"` //this works 
....

}

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/ce0db9ac-486b-4ea4-814a-1702694db61an%40googlegroups.com.

Reply via email to