Results 1 to 2 of 2

Thread: XML Repository

  1. #1
    Contributing Member
    Join Date
    Feb 2008
    Answers
    36

    XML Repository

    Hi All,

    Can you please help me with XML Repository, when do we use XML Repository and how will it be useful in DP? Can you please give an example of how we can implement and use it?

    Regards,
    Tina.


  2. #2
    Expert Member
    Join Date
    Oct 2007
    Answers
    375

    Re: XML Repository

    Hi Tina,

    The advantage of using an XML based repository is that you can easily migrate your repository across machines for different projects.

    Incase we use a DB to store Objects, it becomes mandatory for us to have the Db software installed on all machines. But since XML is a freeware you can implement the same across networks.

    Export your Shared Repository to XML foramt. Navigate to Object repository manager and select the "Export to XML" option.

    Working with XML Repository.

    In order to work with XML based repository, we need to be comfortable with XML based DOM programming. Each object would be treated as an Element and Object Properties would be treated as Attributes.

    We would need to code in somewhat similar lines to read from a XML Repository.

    Dim oNodeValueList()
    'dim count

    'count = 0

    set xmlDoc=CreateObject("Microsoft.XMLDOM")
    xmlDoc.async="false"
    xmlDoc.load("C:\Google.xml")

    set NodeList = xmlDoc.getElementsbyTagName("qtpRep:Object")

    oNodeListLength = NodeList.length

    redim oNodeValueList(oNodeListLength)

    for i = 0 to oNodeListLength
    'Set oNodeList = xmlDoc.getElementsbyTagName("qtpRep:Property").item(i).Text
    sValue = NodeList.item(i).text
    oNodeValueList(i) = sValue
    msgbox oNodeValueList(i)
    next


    The above code basically would read all Objects and display their Properties serially.

    Once you have Object Types (Class) and properties extracted, we could use the same as part of DP programming on following lines -

    Set objDesc = Description.Create()
    objDesc("PropertyName").value = "PropertyValue"

    Browser("micClass:=Browser").Page("micClass:=Page").webEdit(ObjDesc).set ***

    I hope this clears things a bit...

    Cheers...


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact