Click here to Skip to main content
15,881,652 members
Home / Discussions / C#
   

C#

 
AnswerRe: What is best for Parent Child List Pin
PIEBALDconsult21-Jul-11 2:52
mvePIEBALDconsult21-Jul-11 2:52 
AnswerRe: What is best for Parent Child List Pin
BobJanova22-Jul-11 3:06
BobJanova22-Jul-11 3:06 
QuestionBinding to multiple data sources Pin
robertalis20-Jul-11 23:27
robertalis20-Jul-11 23:27 
AnswerRe: Binding to multiple data sources Pin
#realJSOP21-Jul-11 0:13
mve#realJSOP21-Jul-11 0:13 
AnswerRe: Binding to multiple data sources Pin
secorbett21-Jul-11 2:20
secorbett21-Jul-11 2:20 
GeneralRe: Binding to multiple data sources Pin
michalrick29-Jul-11 22:10
michalrick29-Jul-11 22:10 
AnswerRe: Binding to multiple data sources Pin
PIEBALDconsult21-Jul-11 2:54
mvePIEBALDconsult21-Jul-11 2:54 
QuestionGet the ancestor nodes from XML Pin
NarVish20-Jul-11 20:57
NarVish20-Jul-11 20:57 
Hi,
when I select a particular node in the xml, I should be able to display all its ancestors's Token values.
For example, for the Token:"ANA", output should be "PROD,BUSINESS,COS"
for the Token:"DRGPATENT", output should be "PROD,BUSINESS"
I tried to get the immediate parent by using below code. Pls guide me to get all its ancestors. Thanks in advance

foreach (XPathNavigator book in topicsXml.CreateNavigator().Select("//Entity"))
{
   string parent = book.SelectSingleNode("../Token").Value;
}
<CodeList>
  <Entity>
    <Token>PROD</Token>
    <Description>prod</Description>
    <Entity>
      <Token>BUSINESS</Token>
      <Description>Business News</Description>
      <Entity>
        <Token>COS</Token>
        <Description>Company News</Description>
        <Entity>
          <Token>ANA</Token>
          <Description>Analyst Ratings</Description>
          <Entity>
            <Token>ANAMOVES</Token>
            <Description>Analyst Ratings, Estimates and Target Price Changes</Description>
            <Entity>
              <Token>ANACHANGE</Token>
              <Description>Analyst Rating Changes</Description>
              <Entity>
                <Token>ANACUT</Token>
                <Description>Analyst Downgrades</Description>
                <Entity>
                  <Token>ANACUTEVT</Token>
                  <Description>Analyst Ratings Cut Events, Announcements</Description>
                </Entity>
              </Entity>
            </Entity>
          </Entity>
          <Entity>
            <Token>IP</Token>
            <Description>Intellectual Property</Description>
            <Entity>
              <Token>COPYRIGHT</Token>
              <Description>Copyrights</Description>
            </Entity>
          </Entity>
        </Entity>
      </Entity>
      <Entity>
        <Token>DRGPATENT</Token>
        <Description>Drug Patents</Description>
      </Entity>
    </Entity>
  </Entity>
</CodeList>


modified on Thursday, July 21, 2011 5:25 AM

AnswerRe: Get the ancestor nodes from XML Pin
Mirko198020-Jul-11 23:42
Mirko198020-Jul-11 23:42 
GeneralRe: Get the ancestor nodes from XML Pin
NarVish21-Jul-11 0:01
NarVish21-Jul-11 0:01 
AnswerRe: Get the ancestor nodes from XML Pin
PIEBALDconsult21-Jul-11 2:41
mvePIEBALDconsult21-Jul-11 2:41 
QuestionHow can I filterresources from an external assembly by type (text, icons, etc.)? Pin
Erik20-Jul-11 20:31
Erik20-Jul-11 20:31 
QuestionMS Access Query Method Pin
M Riaz Bashir20-Jul-11 19:57
M Riaz Bashir20-Jul-11 19:57 
AnswerRe: MS Access Query Method Pin
Suresh Suthar20-Jul-11 20:49
professionalSuresh Suthar20-Jul-11 20:49 
AnswerRe: MS Access Query Method Pin
GuyThiebaut20-Jul-11 21:44
professionalGuyThiebaut20-Jul-11 21:44 
AnswerRe: MS Access Query Method Pin
Blue_Boy21-Jul-11 1:33
Blue_Boy21-Jul-11 1:33 
GeneralRe: MS Access Query Method Pin
jschell21-Jul-11 9:11
jschell21-Jul-11 9:11 
QuestionStill Struggling to make an autologin app which can automatically fill in the login details as per our URL entered Pin
hackerzpark20-Jul-11 17:30
hackerzpark20-Jul-11 17:30 
AnswerRe: Still Struggling to make an autologin app which can automatically fill in the login details as per our URL entered Pin
Suresh Suthar20-Jul-11 20:46
professionalSuresh Suthar20-Jul-11 20:46 
Questionabout static keyword. [modified] Pin
*DBAU20-Jul-11 11:09
*DBAU20-Jul-11 11:09 
AnswerRe: about static keyword. Pin
David198720-Jul-11 11:31
David198720-Jul-11 11:31 
AnswerRe: about static keyword. Pin
PIEBALDconsult20-Jul-11 14:20
mvePIEBALDconsult20-Jul-11 14:20 
GeneralRe: about static keyword. Pin
*DBAU21-Jul-11 2:27
*DBAU21-Jul-11 2:27 
AnswerRe: about static keyword. Pin
Richard MacCutchan20-Jul-11 22:27
mveRichard MacCutchan20-Jul-11 22:27 
GeneralRe: about static keyword. Pin
*DBAU21-Jul-11 2:30
*DBAU21-Jul-11 2:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.