Searching for a string in xml

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • just888
    New Member
    • Aug 2007
    • 2

    Searching for a string in xml

    Hi
    I'm new to xml..
    I need to build a C# program that searches for a string in an xml document and dispays its type (element , attribute,value etc)
    and in case it is an element , i need to display all this element's values in the xml

    Any help will be highly appreciated

    THX
  • Dököll
    Recognized Expert Top Contributor
    • Nov 2006
    • 2379

    #2
    Originally posted by just888
    Hi
    I'm new to xml..
    I need to build a C# program that searches for a string in an xml document and dispays its type (element , attribute,value etc)
    and in case it is an element , i need to display all this element's values in the xml

    Any help will be highly appreciated

    THX
    Hello just888!

    I will give you a of link for now:

    W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

    Please try it to get an idea how strings work. I will attempt to find exactly what I wanted soon threafter.

    Thanks for coming, good luck!

    Dököll

    Comment

    • just888
      New Member
      • Aug 2007
      • 2

      #3
      hi

      thanks for replying
      i dont understand
      why do I need a parser?
      i need to do my task using C# .net

      again, thx

      Comment

      • jkmyoung
        Recognized Expert Top Contributor
        • Mar 2006
        • 2057

        #4
        Could you give us a little more idea of what you're doing?

        eg, if you have an xml like this:
        [CODE=xml]<abc>
        <def ghi="jkl">mno</def>
        <def>pqr</def>
        <de>stu</de>
        </abc>[/CODE]So, if you search for say, "jkl", you'd get text?
        If you searched for "de" you'd get element, <de>stu</de> ?

        Not sure what you're doing.

        Comment

        Working...