获取xml节点属性的值

I'm trying to unmarshal the following XML:

    <rpc-reply xmlns:junos="http://xml.juniper.net/junos/12.3R9/junos">
        <route-engine-information xmlns="http://xml.juniper.net/junos/12.3R9/junos-chassis">
            <route-engine>
                [...]
                <temperature junos:celsius="36">36 degrees C / 96 degrees F</temperature>
                [...]
            </route-engine>
        </route-engine-information> 
       [...]
    </rpc-reply>

In the end I want the 36 from the junos:celsius attribute but can't find a way, here's my approach:

type RoutingEngines struct {
    RoutingEngine []struct {
        [...]
        Temperature int `xml:"temperature,junos:celsius,attr"`
    } `xml:"route-engine-information>route-engine"`
}

Sadly this doesn't work

You could change your structure a bit.

type RoutingEngines struct {
    RoutingEngine []struct {
        Temperature struct {
            Celsius int    `xml:"celsius,attr"`
            Text    string `xml:",chardata"`
        } `xml:"temperature"`
    } `xml:"route-engine-information>route-engine"`
}

https://play.golang.org/p/zxXsfW-Kzsa