Forum Discussion

adnanghaffar_30's avatar
adnanghaffar_30
New Contributor
8 years ago
Solved

How to get value from XML if there isn't any namespace

Here is response: I have only a single line response nothing else, I want to get the value of CDATA to store in variable for next tests usage.

 

<data contentType="text/plain; charset=UTF-8" contentLength="40"><![CDATA[168527f2f935a5f3bCT0PddpqgIBrN1FYVztXg..]]></data>

 

How can I get the value from CDATA "168527f2f935a5f3bCT0PddpqgIBrN1FYVztXg"

??

2 Replies

    • adnanghaffar_30's avatar
      adnanghaffar_30
      New Contributor

      I am facing issue while logging into using POST request and it always gives me the login page instead of after login, I tried the same stuff on PostMan ant it is working without any issue. When I hit the request for login using parameters "Username" and "Password", It is showing following XML response: 

       Style "Query" and Level "RESOURCE"

      _usernameuserQUERYRESOURCE
      _passwordpass QUERY RESOURCE

       

      Note: I have tried almost all the solution on Google but no success at all.

      <html>
         <head>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
            <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
            <meta name="description" content="admin client login"/>
            <title>admin client login</title>
            <link rel="stylesheet" href="/bookandclaim/admin/css/admin.css"/>
            <script src="/bookandclaim/admin/js/admin.js"/>
            <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
         </head>
         <body>
            <div class="container">
               <div class="row">
                  <div class="col-md-6 col-md-offset-3">
                     <div>Your session has timed out, or you have disabled cookies.</div>
                  </div>
               </div>
               <form action="/bookandclaim/admin/login_check" method="post">
                  <div class="row">
                     <div class="col-md-6 col-md-offset-3">
                        <label for="username">Username:</label>
                        <input type="text" id="username" name="_username" value=""/>
                     </div>
                  </div>
                  <div class="row">
                     <div class="col-md-6 col-md-offset-3">
                        <label for="password">Password:</label>
                        <input type="password" id="password" name="_password"/>
                     </div>
                  </div>
                  <div class="row">
                     <div class="col-md-6 col-md-offset-3">
                        <button type="submit">Login</button>
                     </div>
                  </div>
               </form>
            </div>
         </body>
      </html>