The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:
Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> IBM/Rational Robot

Pages: 1
BMcD
Newbie


Reged: 03/12/09
Posts: 19
Loc: Dublin
Xpaths
      #664151 - 03/14/11 04:58 AM

Hi,
Does Rational Robot support XPaths ?
I'm a little unsure of what it is - is it just the same functionality as using the Robot's SQAGetProperty etc ?
Thanks,
Barry


Post Extras: Print Post   Remind Me!   Notify Moderator  
BMen3D
Newbie


Reged: 04/14/08
Posts: 19
Re: Xpaths [Re: BMcD]
      #680769 - 08/01/11 07:52 AM

You can use someting like this

Set xObj = CreateObject ("Microsoft.XMLDOM")
Set xmlDoc= CreateObject("Microsoft.XMLDOM")

xmlDoc.async= False
xmlDoc.Load(strFolderIncome & aFiles(iFile))

If (xmlDoc.parseError.errorCode <> 0) Then
Dim myErr as Object
Set myErr = xmlDoc.parseError
MsgBox( "You have error " & myErr.reason)
Else

Dim objNodeListUsage as Object

set objNodeListUsage = xmlDoc.getElementsbyTagName("LOAN/Usage")

ReDim aLoan(1,6)
aLoan(0,1) = objNodeListUsage.Item(i).text

...

This example will load an cerain XML and check him.
Then it gets the value between the followin XML tags
<LOAN><USAGE>blabla</USAGE></LOAN>

With XPath you can read out (query) an XML on an easy way

Grtz


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 3 anonymous users are browsing this forum.

Moderator:  AJ, RSBarber 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 2030

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5