C# XML deserialized. How to get a few elements from next line? -


        if (slowo == "sprzedawca")         {             list<ocrres.word> temp = result.words.where(item => item.value.contains(slowo)).tolist();             int line = int.parse(temp.first().line);                console.write(line);         } 

i need view next line elements line atribute of element. how them ? elements looks : <w line="9" blanks="0" fontindex="0" formating="0" confidence="79,56706" pointsize="0" r="90,351,172,30" id="21">sprzedawca</w>

correct me if i'm wrong. given xml , somewhere there there collection of w elements. want collection , each element w extract attributes, right? if case, below how can it:

var xml = xdocument.parse(input); var welements = xml.root.descendantsandself("w");  foreach (var w in welements) {     // extract attribute values     var confidence = w.attribute("confidence").value;      console.writeline(confidence); // prints 79,56706 } 

the code above gets elements w , enumerates them. want check xml.root null.


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -