Can't get element

gloriaindigo

New Member
My .XML database looks like:\[code\]<root> <Lemma> <Lemma.LemmaSign>cat</Lemma.LemmaSign> <Lemma.PartOfSpeech>(noun)</Lemma.PartOfSpeech> <Lemma.UsageLabel>(kt)</Lemma.UsageLabel> <Sense> <TE> <TE.TE> animal</TE.TE> </TE> <Pronunciation>/ <Pronunciation.Pronunciation>[coot]</Pronunciation.Pronunciation>/ </Pronunciation> : <Example> <Example.Example> it's a cat</Example.Example> <Example.Translation> it's animal</Example.Translation> | </Example> </Sense> </Lemma></root>\[/code\]and that's my code:\[code\]var elements = XElement.Load("objects.xml");var query1 = from query in elements.Descendants("Lemma") let null_LemmaSign = query.Element("Lemma.LemmaSign") let null_TE = query.Element("TE.TE") where wyszuk == query.Element("Lemma.LemmaSign").Value select new { word = null_LemmaSign == null ? "none" : null_LemmaSign.Value, te = null_TE == null ? "none" : null_TE.Value, };foreach (var e in query1){ MessageBox.Show(e.word.ToString() + " - " + e.te.ToString());}\[/code\]And the problem is that output looks like:cat - noneand should be cat - animalhow to get TE.TE from my .xml?
 
Back
Top