CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Validate XPATH

  1. #1
    Join Date
    Oct 2006
    Posts
    123

    Validate XPATH

    hi guys,
    i am start to learn XPath but i have problem , i am write my xml doc but i can not where i write my expression to find what i want from data ?

    example
    Code:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <bookstore>
    <book>
      <title lang="eng">Harry Potter</title>
      <price>29.99</price>
    </book>
    <book>
      <title lang="eng">Learning XML</title>
      <price>39.95</price>
    </book>
    </bookstore>
    ====================================================
    Path Expression || Result
    ====================================================
    bookstore || Selects all the child nodes of the bookstore element
    ====================================================
    /bookstore || Selects the root element bookstore
    ====================================================
    Last edited by honeyboy_20; January 16th, 2009 at 09:49 AM.

  2. #2
    Join Date
    Sep 2008
    Location
    Netherlands
    Posts
    865

    Re: Validate XPATH

    Take a look at this example about xpath

    http://www.codeproject.com/KB/cpp/myXPath.aspx

  3. #3
    Join Date
    Oct 2006
    Posts
    123

    Re: Validate XPATH

    very good dannystommen , this through the API of .Net , but can i write any expression into notepad or any editor? if this can be....How ?

  4. #4
    Join Date
    Sep 2008
    Location
    Netherlands
    Posts
    865

    Re: Validate XPATH

    use the streamwriter class

    Code:
             StreamWriter SR = new StreamWriter(@"C:\myDocument.txt");
             SR.Write("This is the content of the document");
             SR.Flush();
             SR.Close();

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured