Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Read and Write data to XML
#1
Solved: 10 Years, 9 Months, 1 Week ago
Hi,

I want to know how to read and write data to XML, if possible create additional tags in XML.

Code:
<?xml version="1.0" encoding="UTF-8"?>
<template>
  <abc version="1.5"/>
  <name key="key.1"/>
  <version>1.5</version>
  <description key="key.13"/>
  <supportedLocale>EN</supportedLocale>
  <defaultLocale>EN</defaultLocale>
  <minimumPassingScore>50</minimumPassingScore>
  <section>
    <name key="key.2"/>
    <description key="key.12"/>
    <order>0</order>
    <minimumPassingScore>100</minimumPassingScore>
    <requiresAudit>false</requiresAudit>
    <weight>100</weight>
    <question>
      <text key="key.3"/>
      <order>1</order>
      <type>exclusive</type>
      <weight>100</weight>
      <choice>
        <text key="key.4"/>
        <value>50</value>
      </choice>
    </question>
    <section>
      <name key="key.8"/>
      <description key="key.14"/>
      <order>2</order>
      <minimumPassingScore>100</minimumPassingScore>
      <requiresAudit>false</requiresAudit>
      <weight>100</weight>
      <question>
        <text key="key.9"/>
        <order>3</order>
        <type>binary</type>
        <weight>100</weight>
        <choice>
          <text key="key.10"/>
          <value>100</value>
        </choice>
      </question>
    </section>
  </section>
  <stringBundle>
    <localeBundle locale="EN">
      [b]<externalString keyref="key.1">Questionnaire Name</externalString>[/b]
      <externalString keyref="key.2">Test Section123</externalString>
    </localeBundle>
  </stringBundle>
</template>

Above is the my XML file, where i want to retrieve the content in
<externalString keyref="key.1">Questionnaire Name</externalString> i.e., the text "Questionnaire Name"

I want to know how to write data and to create additional XML tags if possible
Reply
#2
Solved: 10 Years, 9 Months, 1 Week ago
Probably you can do this with CreateObject("Microsoft.XmlDom").
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Want to read the data from excel and set read value in the JavaTable rajeevk7 0 2,172 07-10-2017, 04:20 PM
Last Post: rajeevk7
  How to read and write in excel through QTP script shwetha_m 5 29,263 03-14-2014, 02:58 PM
Last Post: venkatesh9032
  Unable to read the data from excel file attiliv 1 2,859 03-26-2013, 08:02 AM
Last Post: sams001
  How to Read Encrypted Data from SQL DB? lagunascorpio 1 2,345 05-31-2012, 03:20 AM
Last Post: lagunascorpio
  HP Run Results Viewer 11 don't substitute the data from an external xml file. dondemon 0 2,624 04-16-2012, 05:56 PM
Last Post: dondemon

Forum Jump:


Users browsing this thread: 1 Guest(s)