예제 #1
0
파일: MoIP.cs 프로젝트: moiplabs/MoIP.NET
        private MoIPResposta GetMoIPRespostaFromXML(string Response)
        {
            XmlDocument XmlResposta = new XmlDocument();
            XmlResposta.LoadXml(Response);

            MoIPResposta resposta = new MoIPResposta();
            resposta.ID = XmlResposta.DocumentElement.SelectSingleNode("//Resposta//ID").InnerText;
            resposta.Token = XmlResposta.DocumentElement.SelectSingleNode("//Resposta//Token").InnerText;
            resposta.Sucesso = XmlResposta.DocumentElement.SelectSingleNode("//Resposta/Status").InnerText.Equals("Sucesso");

            return resposta;
        }
예제 #2
0
        private MoIPResposta GetMoIPRespostaFromXML(string Response)
        {
            XmlDocument XmlResposta = new XmlDocument();

            XmlResposta.LoadXml(Response);

            MoIPResposta resposta = new MoIPResposta();

            resposta.ID      = XmlResposta.DocumentElement.SelectSingleNode("//Resposta//ID").InnerText;
            resposta.Token   = XmlResposta.DocumentElement.SelectSingleNode("//Resposta//Token").InnerText;
            resposta.Sucesso = XmlResposta.DocumentElement.SelectSingleNode("//Resposta/Status").InnerText.Equals("Sucesso");

            return(resposta);
        }