CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2021

    Unhappy Xpath expression to extract value from a node/element


    Please see the xml below. I am trying to write an Xpath expression to retrieve the string value from the element "SessionID". The code I wrote,




    returns no value. Please help me with this.

    <?xml version="1.0" encoding="utf-8"?>
    <IDMResponse xmlns:xsd="" xmlns:xsi="" MajorVersion="1" xmlns="">
    <Response ResponseCode="Ok">
    <Worker MajorVersion="1" MinorVersion="0" FixVersion="1">
    <FullName>jam admin</FullName>
    <SecurityIdentifier TypeCode="UserName">jamadmin</SecurityIdentifier>
    <WorkLocation><HomeStore /></WorkLocation>

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Hanover Germany

    Re: Xpath expression to extract value from a node/element

    1. Please, post every code/script.xml block to be properly formatted and indented. Use Code tags for this.
    Example: you write:
    [CODE]some code ...
    indentation ...[/CODE]
    and we will see
    some code ... 
        indentation ...
    2. You didn't provide any code "you wrote" to parse this xml.
    Victor Nijegorodov

Tags for this Thread

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