xml

<?xml version="1.0" encoding="utf-8"?>
<config>
<emailconfig>
<offerurl>http://10.29.132.83/HrisAssist/WebService/InstanceFlow3.asmx</offerurl>
<csofferurl>http://10.29.185.68:8084/WebService/InstanceFlow3.asmx</csofferurl>
</emailconfig>
</config>

----------------------------------------

XDocument document = XDocument.Load("EmailAddress.xml");
NLogHelper.WriteLogByCustom(logtitle, $"document." + JsonConvert.SerializeObject(document), LogLevel.Debug, LogModelPrefix.HREXTEND, logtitle);
XElement root = document.Root;
NLogHelper.WriteLogByCustom(logtitle, $"root." + JsonConvert.SerializeObject(root), LogLevel.Debug, LogModelPrefix.HREXTEND, logtitle);
XElement ele = root.Element("emailconfig");
NLogHelper.WriteLogByCustom(logtitle, $"ele." + JsonConvert.SerializeObject(ele), LogLevel.Debug, LogModelPrefix.HREXTEND, logtitle);
XElement offerurl = ele.Element("csofferurl");
InstanceFlow3Offer.Url = offerurl.Value.ToString();

---------------------------------------

 

 

 

 

 

posted @ 2022-01-20 15:33  泉城余文乐  Views(19)  Comments(0Edit  收藏  举报