Basically:
- single quotes around '[XMLFromString[resultxml]' and one extr bracket need to be deleted (if they were used):
KVListGetListValue[XMLFromString[resultxml],'.....']
- if result has only one named-fact there is no need to use find functions - value can be accessed directly.
- Function XMLFromString for every XML element returns KVList more complex then just one having list of subelements,
It also returns possible attributes, namespacelabel, value. Specifically every xml element results in KVList with 4
predefined keys - elm (having as value list of subelements), atr (having as value list of attributes), nsl (having as
value namerspace label) and val - value of the element. You can print result of XMLFromString and see yourself.
That means when specifying path to value in functions like KVListGet... names of xml elements need to be interleaved
with qualifiers elm or atr.
Following path
'knowledgebase-response.elm.inOutFacts.elm.named-fact.elm.fact.elm.startTime.val'
means take knowledgebase-response element, inside it take sublement inOutFacts (elm.inOutFacts)
inside it take sublement named-fact (elm.named-fact), inside it take subelement fact (elm.fact) inside it take
subelement startTime (elm.startTime) and inside it takes just its value.
Path like 'knowledgebase-response.elm.inOutFacts.atr.class' would mean
take knowledgebase-response element, inside it take sublement inOutFacts (elm.inOutFacts) and inside it take
attribute with name class.
To put it all together: if you need value of startTime/stopTime in case you described the follwing should work:
varResultList = XMLFromString[resultxml]
varStatrtTime= KVListGetStringValue[varResultList,'knowledgebase-response.elm.inOutFacts.elm.named-fact.elm.fact.elm.startTime.val']
varStoptTime= KVListGetStringValue[varResultList,'knowledgebase-response.elm.inOutFacts.elm.named-fact.elm.fact.elm.stopTime.val']