Hi guys,
smashing my head for 2 days and can't see my error...so I connected to ConfigServer, send a request and it returns (yay! xml! values needed!)
And got stuck lol
Trying to capture the 853 from:
[code]
<DBID value="853" />
[/code]
My code:
[code]
XDocument resultDocument = objectsRead.ConfObject; //Capture the XML part of the object
var temp = resultDocument.Descendants("DBID").Select(x => "DBID " + x.Attribute("value").Value).ToList();
[/code]
And I need to catch the DBID to send it to another CfgQuery...BUT the read of this value fails...
I think it has to do something with the UTF8...I tried many ways and same issue.
Anybody has a code to read these values and a little slap to me to understand why am I failing so miserably?
XML is:
[code]
<?xml version="1.0" encoding="utf-16"?>
<ConfData xmlns="http://schemas.genesyslab.com/Protocols/Configuration/ConfServer/2005/">
<CfgPerson>
<DBID value="853" />
<tenantDBID value="101" />
<lastName value="Rodrigues Geske" />
<firstName value="Eduardo" />
<employeeID value="T01039" />
<userName value="T01039" />
<password value="81DC9BDB52D04DC20036DBD8313ED055" />
<isAgent value="2" />
<CfgAgentInfo>
<placeDBID value="0" />
<skillLevels>
<CfgSkillLevel>
<skillDBID value="104" />
<level value="0" />
</CfgSkillLevel>
</skillLevels>
<agentLogins>
<CfgAgentLoginInfo>
<agentLoginDBID value="277" />
<wrapupTime value="0" />
</CfgAgentLoginInfo>
</agentLogins>
<capacityRuleDBID value="0" />
<siteDBID value="0" />
<contractDBID value="0" />
</CfgAgentInfo>
<isAdmin value="1" />
<state value="1" />
</CfgPerson>
</ConfData>
[/code]
Thanks!