SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Junior Member
    Join Date
    Aug 2006
    Location
    london
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Help with QTP code

    Hi

    I am using the below code to compare xml files in two different folders, the difference file is getting updated with the old one being erased even though I used the File append mode.[censored] Issue, quich response is much helpful and grateful. Below is

    my code:

    Function xmlcomp()

    actualfolder = "C:\ERSTest\QTP\QTP_TASK\Post\"

    expectedfolder = "C:\ERSTest\QTP\QTP_TASK\Pre\"

    resultfolder = "C:\ERSTest\QTP\QTP_TASK\Result\"

    Dim fso, f, fc, f1

    Set fso = CreateObject("Scripting.FileSystemObject")

    Set f = fso.GetFolder(expectedfolder)

    Set fc = f.Files

    For Each f1 in fc

    expectedfile = expectedfolder + f1.name

    actualfile = actualfolder + f1.Name

    Set oXML1 = CreateObject("Msxml2.DOMDocument")
    oXML1.load(expectedfile)

    Set oXML2 = CreateObject("Msxml2.DOMDocument")
    oXML2.load(actualfile)

    Set XMLElements1= oXML1.DocumentElement.ChildNodes
    Set XMLElements2= oXML2.DocumentElement.ChildNodes

    If XMLElements1.length=XMLElements2.length Then

    reporter.ReportEvent micPass, "Child Nodes - Equal", "Pass"

    For i = 0 to XMLElements1.length-1

    If XMLElements1.item(i).Text <> XMLElements2.item(i).Text Then

    reporter.ReportEvent micFail, " Elements are not same- XML files are not equal", "Fail"

    oXML2.save("C:\ERSTest\QTP\QTP_TASK\Result\errorfi le.txt")

    errorfile = "C:\ERSTest\QTP\QTP_TASK\Result\errorfile.txt"

    err_update "************************************************* *******************", errorfile

    err_update "updates start here", errorfile

    err_update "************************************************* *******************", errorfile

    Exit for

    end if

    Next

    reporter.ReportEvent micPass, "Elements same- XML files are equal", "Pass"

    else

    reporter.ReportEvent micFail, "Child Nodes - Not Equal- XML files are not equal", "Fail"

    End If

    Next

    End Function
    ----------------------------------------------------------------------------

    Public Function err_update(errstring, errorfile)

    dim fileSource, MyFile
    Set fileSource = CreateObject("Scripting.FileSystemObject")
    Set MyFile = fileSource.OpenTextFile(errorfile, 8, True)
    MyFile.WriteLine Date & " " & Time & " : " &errstring
    MyFile.Close

    End Function

    -----------------------------------------

    Many thanks in advance
    Maruti

  2. #2
    Super Member
    Join Date
    Dec 2005
    Location
    USA
    Posts
    1,407
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: Help with QTP code

    can you attach the xml files
    ------------
    Chikki
    when things gets harder ,the harder gets going

  3. #3
    Junior Member
    Join Date
    Aug 2006
    Location
    london
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Help with QTP code

    1.<items><item>martin</item><item>QTP_Batch</item></items> --> Post Folder and <items><item>Justin</item><item>QTP_Batch</item></items> --> Pre Folder

    2. <results nobaseCcy=""></results> --> Post folder, <results Ccy=""></results>--> Pre folder

    3. Post Folder:
    <permission><status><success>tru e</success><message></message><functions><allowed>Hierarc hy</allowed><allowed>Batch</allowed><allowed>RiskAttribution</allowed><allowed>ManagementConsole</allowed><allowed>debug</allowed><allowed>Jobs</allowed><allowed>MakeOfficial</allowed><allowed>Adhoc</allowed></functions><isAdmin>true</isAdmin><sessionId>7B6717446036207D62D066 82C97C3348</sessionId></status><securedObjects><securedObject scheme="urn:calypsom-com:risk-hierarchy"><hierarchies><hierarchy> <hierarchyName>Risk_Official</hierarchyName><nodes><node nid="1726328411"><name>Risk_Official</name><nodes><node nid="-1561732332"><name ITRADEFILTER="QTP_Trades" HASANALYSIS="false">QTP_Trades</name></node><node nid="-1489970188"><name>TimeReport</name><nodes><node nid="-1214496264"><name ITRADEFILTER="Monthly_Trade" HASANALYSIS="false">Monthly_Trade</name></node><node nid="-1792380960"><name ITRADEFILTER="Weekly_Trade" HASANALYSIS="false">Weekly_Trade</name></node><node nid="-499008596"><name ITRADEFILTER="Today_Trade" HASANALYSIS="false">Today_Trade</name></node></nodes></node></nodes></node></nodes></hierarchy><otherhieraries><hName>De fault</hName><hName>Entitlement</hName><hName>Limit_Official</hName></otherhieraries></hierarchies></securedObject><securedObject scheme="urn:calypsom-com:user-defaults"><pricingEnv>default</pricingEnv></securedObject><securedObject scheme="urn:calypsom-comricing-environments"><pricingEnvironments><pr icingEnv>BACKOFFICE</pricingEnv><pricingEnv>default</pricingEnv></pricingEnvironments></securedObject><securedObject scheme="urn:calypsom-com:trade-filters"><tradeFilters><tradeFilter&gt ;MARKET_CONFORMITY</tradeFilter><tradeFilter>Monthly_Trade&lt ;/tradeFilter><tradeFilter>QTP_Trades</tradeFilter><tradeFilter>Today_Trade</tradeFilter><tradeFilter>Weekly_Trade</tradeFilter></tradeFilters></securedObject><securedObject scheme="urn:calypsom-com:histsim-parameters"><histsimParameters><parame ter>Standard</parameter></histsimParameters></securedObject><securedObject scheme="urn:calypsom-com:economicalpl-parameters"><parameters><parameter> Standard</parameter></parameters></securedObject><securedObject scheme="urn:calypsom-comricing-parameters"><parameters></parameters></securedObject><securedObject scheme="urn:calypsom-com:analysis-configurations"><storedAnalyses><analy sis analysisName="HypPL" inuse="1"><variables><name value="Standard">parameter</name></variables></analysis><analysis analysisName="ProfitLoss" inuse="1"><parameters><parameter>St andard</parameter></parameters><variables><name value="Standard">parameter</name></variables></analysis><analysis analysisName="EQDelta" inuse="1"><groupings><groupName>Cur rency</groupName><groupName>Product</groupName><groupName>Book</groupName><groupName>Counterparty</groupName><groupName>Strategy</groupName><groupName>Date</groupName></groupings><variables><name value="default">parameter</name></variables></analysis><analysis analysisName="FXRisk" inuse="1"><groupings><groupName>Cur rency</groupName><groupName>Date</groupName></groupings><variables><name value="default">parameter</name></variables></analysis><analysis analysisName="QuoteValueRecorder" inuse="1"></analysis><analysis analysisName="IRDelta" inuse="1"><groupings><groupName>Cur rency</groupName><groupName>Product</groupName><groupName>Book</groupName><groupName>Counterparty</groupName><groupName>Strategy</groupName><groupName>Date</groupName></groupings><variables><name value="UpOneBp">parameter</name></variables></analysis><analysis analysisName="IRGamma" inuse="1"><groupings><groupName>Cur rency</groupName><groupName>Product</groupName><groupName>Book</groupName><groupName>Counterparty</groupName><groupName>Strategy</groupName><groupName>Date</groupName></groupings><variables><name value="Up2Bp-2Up1Bp">parameter</name></variables></analysis><analysis analysisName="IRVega" inuse="1"><groupings><groupName>Cur rency</groupName><groupName>Product</groupName><groupName>Book</groupName><groupName>Counterparty</groupName><groupName>Strategy</groupName><groupName>Date</groupName></groupings><variables><name value="IRVegaN">parameter</name></variables></analysis><analysis analysisName="CSDelta" inuse="1" pivot="true" treeview="true"><groupings><groupName& gt;Region</groupName><groupName>Industry</groupName><groupName>Currency</groupName><groupName>Issuer</groupName><groupName>Product</groupName><groupName>Country</groupName><groupName>Date</groupName></groupings><variables><name value="CS01Up">parameter</name></variables></analysis><analysis analysisName="CrossAssetPL" inuse="1"><variables><name value="default">parameter</name></variables></analysis><analysis analysisName="Scenario.Stress" inuse="1"><groupings><groupName>Cur rency</groupName><groupName>Product</groupName><groupName>Book</groupName><groupName>Counterparty</groupName><groupName>Strategy</groupName><groupName>Issuer</groupName><groupName>Date</groupName></groupings></analysis><analysis analysisName="Scenario.Credit_View" inuse="1" pivot="true" treeview="true"><groupings><groupName& gt;Region</groupName><groupName>Industry</groupName><groupName>Currency</groupName><groupName>Issuer</groupName><groupName>Product</groupName><groupName>Country</groupName><groupName>Date</groupName></groupings></analysis><analysis analysisName="IRDeltaZ" inuse="1"><groupings><groupName>Cur rency</groupName><groupName>Product</groupName><groupName>Book</groupName><groupName>Counterparty</groupName><groupName>Strategy</groupName><groupName>Date</groupName></groupings><variables><name value="IRDeltaZ">parameter</name></variables></analysis><analysis analysisName="Scenario.IRSlide" inuse="1"><groupings><groupName>Cur rency</groupName><groupName>Product</groupName><groupName>Book</groupName><groupName>Counterparty</groupName><groupName>Strategy</groupName><groupName>Date</groupName></groupings></analysis><analysis analysisName="HistSim" inuse="1" treeview="n/a"><parameters><parameter Horizon="1">Standard</parameter></parameters><groupings><groupName>To tal</groupName><groupName>RiskType</groupName><groupName>Currency</groupName><groupName>Product</groupName><groupName>Book</groupName><groupName>Date</groupName></groupings><variables><name label="Horizon" value="1 Day">horizon</name><name label="Confidence Level" value="95%">confidence</name><name label="Weighting" value="Equal">weighting</name><name value="Standard">parameter</name><name label="Observations" value="250">observations</name></variables></analysis><analysis analysisName="HistVaR" inuse="1" adhocOf="HistSim"><groupings><groupNam e>Total</groupName><groupName>Currency</groupName><groupName>Product</groupName><groupName>Book</groupName><groupName>Counterparty</groupName><groupName>Strategy</groupName><groupName>Issuer</groupName><groupName>Date</groupName></groupings><variables><name label="Horizon" value="1 Day">horizon</name><name label="Confidence Level" value="95%">confidence</name><name label="Weighting" value="Equal">weighting</name><name label="VaR Percentage" value="1">display</name><name label="Parameter" value="Standard">parameter</name><name label="Observations" value="250">observations</name></variables></analysis><analysis analysisName="MrgVaR" inuse="1" adhocOf="HistSim"><groupings><groupNam e>Currency</groupName><groupName>Product</groupName><groupName>Book</groupName><groupName>Counterparty</groupName><groupName>Strategy</groupName><groupName>Issuer</groupName></groupings><variables><name label="Horizon" value="1 Day">horizon</name><name label="Confidence Level" value="95%">confidence</name><name label="Weighting" value="Equal">weighting</name><name label="VaR Percentage" value="1">display</name><name label="Parameter" value="Standard">parameter</name><name label="Observations" value="250">observations</name></variables></analysis><analysis analysisName="IncrVaR" inuse="1" adhocOf="HistSim"><groupings><groupNam e>Currency</groupName><groupName>Product</groupName><groupName>Book</groupName><groupName>Counterparty</groupName><groupName>Strategy</groupName><groupName>Issuer</groupName></groupings><variables><name label="Horizon" value="1 Day">horizon</name><name label="Confidence Level" value="95%">confidence</name><name label="Weighting" value="Equal">weighting</name><name label="VaR Percentage" value="1">display</name><name label="Parameter" value="Standard">parameter</name><name label="Observations" value="250">observations</name></variables></analysis><analysis analysisName="BackTest" inuse="1" treeview="n/a" adhocOf="HypPL" overlapon="Std10d" class="backtesting"><groupings><groupN ame>Currency</groupName><groupName>RiskType</groupName><groupName>Product</groupName><groupName>Book</groupName></groupings><variables><name label="Observations" value="250">observations</name><name label="Horizon" value="1 Day">horizon</name><name label="From Date" value="2007-7-31" usevalue="true">fromdate</name><name label="One Tailed" value="false">one_tailed</name><name label="Confidence Level" value="95%">confidence</name><name label="Weighting" value="Equal">weighting</name><name label="Overlap Incr" value="1 Day">overlap</name><name label="Parameter" value="Standard">parameter</name><name label="Days" value="120" usevalue="false">days</name></variables></analysis><analysis analysisName="Capital" inuse="1" treeview="n/a" adhocOf="HistSim" class="riskcapital"><groupings><groupN ame>RiskType</groupName><groupName>Date</groupName></groupings><variables><name label="Horizon" value="10 Day">horizon</name><name label="Confidence Level" value="99%">confidence</name><name label="Weighting" value="Equal">weighting</name><name label="From Date" value="2007-7-31" usevalue="false">fromdate</name><name label="Scaling Factor" value="3.0">scale_factor</name><name label="Parameter" value="Standard">parameter</name><name label="Observations" value="250">observations</name><name label="Days" value="60" usevalue="true">days</name></variables></analysis><analysis analysisName="IRVegaDrv" inuse="1"><groupings><groupName>Cur rency</groupName><groupName>Product</groupName><groupName>Book</groupName><groupName>Counterparty</groupName><groupName>Strategy</groupName><groupName>Issuer</groupName><groupName>Date</groupName></groupings><variables><name value="default">parameter</name></variables></analysis><analysis analysisName="PricingReport" inuse="1"><parameters></parameters><variables><name value="default">parameter</name></variables></analysis></storedAnalyses></securedObject><securedObject scheme="urn:calypsom-com:scenario-parameters"><parameters><parameter> A_Gamma</parameter><parameter>archeus</parameter><parameter>Basis_shift</parameter><parameter>Basket_Shock</parameter><parameter>Bear_Flat</parameter><parameter>Bear_steep</parameter><parameter>Bull_Flattening</parameter><parameter>Bull_steepening</parameter><parameter>cds_multiplicative_s hift</parameter><parameter>Composite</parameter><parameter>corp_spread_widening </parameter><parameter>Correlation_shock&lt ;/parameter><parameter>credit_cons</parameter><parameter>credit_curve</parameter><parameter>Credit_View</parameter><parameter>Delta</parameter><parameter>Flattener</parameter><parameter>FX_shock</parameter><parameter>FX_Spot_Vol</parameter><parameter>FX_Vol_shock</parameter><parameter>Gamma</parameter><parameter>IR_Credit_Simul</parameter><parameter>IR_Range</parameter><parameter>IR_Range_Zero</parameter><parameter>IRDeltaN</parameter><parameter>mult_shift</parameter><parameter>Parallel_move</parameter><parameter>PFE</parameter><parameter>PFE_Forward</parameter><parameter>PFE_FX_Shock</parameter><parameter>PFE_IRshift</parameter><parameter>Recovery_shocks</parameter><parameter>spread_widen_mult&lt ;/parameter><parameter>spreads_seq_move</parameter><parameter>Steepener</parameter><parameter>Time_1Y_2Y</parameter><parameter>Vol_shocks</parameter></parameters></securedObject><securedObject scheme="urn:calypsom-com:scenario-mktset"><scenarioMktItems><mktItems&gt ;<mktitem>all_fx</mktitem><mktitem>all_ir</mktitem><mktitem>all_ir_cad</mktitem><mktitem>all_ir_credit</mktitem><mktitem>all_ir_usd</mktitem><mktitem>all_vol</mktitem><mktitem>Basis_curve</mktitem><mktitem>Correlation_Issuer</mktitem><mktitem>credit_curves</mktitem><mktitem>Credit_Recovery_curves&l t;/mktitem><mktitem>FX_Data</mktitem><mktitem>Quotes_Cash</mktitem><mktitem>Quotes_Equity</mktitem><mktitem>Quotes_FX</mktitem><mktitem>Vol_Bond</mktitem></mktItems><ruleItems><ruleitem>addit ive_shift_simul</ruleitem><ruleitem>additive_shift_ul</ruleitem><ruleitem>BASE</ruleitem><ruleitem>Bear_Flattener</ruleitem><ruleitem>Bear_Steepener</ruleitem><ruleitem>Bull_Flattener</ruleitem><ruleitem>Bull_Steepener</ruleitem><ruleitem>Bull_steepener_ul</ruleitem><ruleitem>Corr_up_10</ruleitem><ruleitem>credit_curve_rule</ruleitem><ruleitem>Equity_up_10</ruleitem><ruleitem>Equity_up_20</ruleitem><ruleitem>FX_10_Mult</ruleitem><ruleitem>FX_10percent</ruleitem><ruleitem>FX_Matrix_Shocks</ruleitem><ruleitem>fx_usd_jpy_dn_5</ruleitem><ruleitem>fx_usd_jpy_up_5</ruleitem><ruleitem>Ir_Credit_Simul</ruleitem><ruleitem>mult_shift_simul</ruleitem><ruleitem>multiple_sets</ruleitem><ruleitem>Quotes_additive</ruleitem><ruleitem>Quotes_mult</ruleitem><ruleitem>seq1bpdn</ruleitem><ruleitem>seq1bpup</ruleitem><ruleitem>seq_additive</ruleitem><ruleitem>seqzero1bp</ruleitem><ruleitem>simul10bpdn</ruleitem><ruleitem>simul10bpup</ruleitem><ruleitem>simul1bp</ruleitem><ruleitem>simul1bp_ul</ruleitem><ruleitem>simul1bpdn</ruleitem><ruleitem>simul1bpdn_zero</ruleitem><ruleitem>simul1bpup</ruleitem><ruleitem>simul1bpup_zero</ruleitem><ruleitem>STB_Requirements</ruleitem><ruleitem>Steepener</ruleitem><ruleitem>Time_1Y_2Y</ruleitem><ruleitem>ul_1bp_10y</ruleitem><ruleitem>ul_1bp_1y</ruleitem><ruleitem>ul_1bp_2y</ruleitem><ruleitem>ul_1bp_3y</ruleitem><ruleitem>ul_1bp_4y</ruleitem><ruleitem>ul_1bp_50y</ruleitem><ruleitem>ul_1bp_5y</ruleitem><ruleitem>ul_1bp_6y</ruleitem><ruleitem>ul_1bp_7y</ruleitem><ruleitem>ul_1bp_8y</ruleitem><ruleitem>ul_1bp_9y</ruleitem><ruleitem>ul_simul_5</ruleitem><ruleitem>ul_simul_dn_10</ruleitem><ruleitem>ul_simul_dn_5</ruleitem><ruleitem>ul_ten_percent_shift&l t;/ruleitem><ruleitem>underlyings_additive_s hift</ruleitem><ruleitem>underlyings_multiplica tive_shift</ruleitem><ruleitem>Vol_dn_10</ruleitem><ruleitem>Vol_dn_20</ruleitem><ruleitem>Vol_shocks</ruleitem><ruleitem>Vol_shocks_fx</ruleitem><ruleitem>Vol_up_10</ruleitem><ruleitem>Vol_up_20</ruleitem></ruleItems></scenarioMktItems></securedObject><securedObject scheme="urn:calypsom-com:view-parameters"><viewParameters><item>& lt;name>limitMode</name><value>0</value></item><item><name>offsetDate</name><value>-1</value></item></viewParameters><GUIConfigs></GUIConfigs></securedObject><securedObject scheme="urn:calypsom-com:risk-class"><riskclasses><classname classtype="1">tk.risk.sim.ShiftItemBasketCorrel ation</classname><classname classtype="1">tk.risk.sim.ShiftItemBondPrice&lt ;/classname><classname classtype="1">tk.risk.sim.ShiftItemCDSIndexSpre ad</classname><classname classtype="1">tk.risk.sim.ShiftItemCap</classname><classname classtype="1">tk.risk.sim.ShiftItemCommodityPri ce</classname><classname classtype="1">tk.risk.sim.ShiftItemCorrelationS urface</classname><classname classtype="1">tk.risk.sim.ShiftItemCurveBasis&l t;/classname><classname classtype="1">tk.risk.sim.ShiftItemCurveBorrow& lt;/classname><classname classtype="1">tk.risk.sim.ShiftItemCurveCommodi ty</classname><classname classtype="1">tk.risk.sim.ShiftItemCurveCommodi tySpread</classname><classname classtype="1">tk.risk.sim.ShiftItemCurveConveni enceYield</classname><classname classtype="1">tk.risk.sim.ShiftItemCurveDividen d</classname><classname classtype="1">tk.risk.sim.ShiftItemCurveFX</classname><classname classtype="1">tk.risk.sim.ShiftItemCurveInflati on</classname><classname classtype="1">tk.risk.sim.ShiftItemCurvePreciou sMetal</classname><classname classtype="1">tk.risk.sim.ShiftItemCurveProbabi lity</classname><classname classtype="1">tk.risk.sim.ShiftItemCurveRepo&lt ;/classname><classname classtype="1">tk.risk.sim.ShiftItemCurveZero&lt ;/classname><classname classtype="1">tk.risk.sim.ShiftItemCurveZeroFXD erived</classname><classname classtype="1">tk.risk.sim.ShiftItemEquity</classname><classname classtype="1">tk.risk.sim.ShiftItemEquityOption s</classname><classname classtype="1">tk.risk.sim.ShiftItemFX</classname><classname classtype="1">tk.risk.sim.ShiftItemFXVolatility Surface</classname><classname classtype="1">tk.risk.sim.ShiftItemFloor</classname><classname classtype="1">tk.risk.sim.ShiftItemFutureOption s</classname><classname classtype="1">tk.risk.sim.ShiftItemFuturePrice& lt;/classname><classname classtype="1">tk.risk.sim.ShiftItemVolatilitySu rface3D</classname><classname classtype="2">tk.risk.sim.conditional.IsCurrenc y</classname><classname classtype="2">tk.risk.sim.conditional.IsIndex&l t;/classname><classname classtype="2">tk.risk.sim.conditional.IsName&lt ;/classname></riskclasses></securedObject><securedObject scheme="urn:calypso-com:scenario-weighting"><weightingMechanisms></weightingMechanisms></securedObject></securedObjects></permission>

    Pre Folder:
    <permission><status><success>tru e</success><message></message><functions><allowed>Hierarc hy</allowed><allowed>Batch</allowed><allowed>RiskAttribution</allowed><allowed>ManagementConsole</allowed><allowed>debug</allowed><allowed>Jobs</allowed><allowed>MakeOfficial</allowed><allowed>Adhoc</allowed></functions><isAdmin>true</isAdmin><sessionId>BB2D9A1F46DA2D4EF35994 5472C80351</sessionId></status><securedObjects><securedObject scheme="urn:calypsom-com:risk-hierarchy"><hierarchies><hierarchy> <hierarchyName>Risk_Official</hierarchyName><nodes><node nid="1726328411"><name>Risk_Official</name><nodes><node nid="-1561732332"><name ITRADEFILTER="QTP_Trades" HASANALYSIS="false">QTP_Trades</name></node><node nid="-1489970188"><name>TimeReport</name><nodes><node nid="-1214496264"><name ITRADEFILTER="Monthly_Trade" HASANALYSIS="false">Monthly_Trade</name></node><node nid="-1792380960"><name ITRADEFILTER="Weekly_Trade" HASANALYSIS="false">Weekly_Trade</name></node><node nid="-499008596"><name ITRADEFILTER="Today_Trade" HASANALYSIS="false">Today_Trade</name></node></nodes></node></nodes></node></nodes></hierarchy><otherhieraries><hName>De fault</hName><hName>Entitlement</hName><hName>Limit_Official</hName></otherhieraries></hierarchies></securedObject><securedObject scheme="urn:calypsom-com:user-defaults"><pricingEnv>default</pricingEnv></securedObject><securedObject scheme="urn:calypsom-comricing-environments"><pricingEnvironments><pr icingEnv>BACKOFFICE</pricingEnv><pricingEnv>default</pricingEnv></pricingEnvironments></securedObject><securedObject scheme="urn:calypsom-com:trade-filters"><tradeFilters><tradeFilter&gt ;MARKET_CONFORMITY</tradeFilter><tradeFilter>Monthly_Trade&lt ;/tradeFilter><tradeFilter>QTP_Trades</tradeFilter><tradeFilter>Today_Trade</tradeFilter><tradeFilter>Weekly_Trade</tradeFilter></tradeFilters></securedObject><securedObject scheme="urn:calypsom-com:histsim-parameters"><histsimParameters><parame ter>Standard</parameter></histsimParameters></securedObject><securedObject scheme="urn:calypsom-com:economicalpl-parameters"><parameters><parameter> Standard</parameter></parameters></securedObject><securedObject scheme="urn:calypsom-comricing-parameters"><parameters></parameters></securedObject><securedObject scheme="urn:calypsom-com:analysis-configurations"><storedAnalyses><analy sis analysisName="HypPL" inuse="1"><variables><name value="Standard">parameter</name></variables></analysis><analysis analysisName="ProfitLoss" inuse="1"><parameters><parameter>St andard</parameter></parameters><variables><name value="Standard">parameter</name></variables></analysis><analysis analysisName="EQDelta" inuse="1"><groupings><groupName>Cur rency</groupName><groupName>Product</groupName><groupName>Book</groupName><groupName>Counterparty</groupName><groupName>Strategy</groupName><groupName>Date</groupName></groupings><variables><name value="default">parameter</name></variables></analysis><analysis analysisName="FXRisk" inuse="1"><groupings><groupName>Cur rency</groupName><groupName>Date</groupName></groupings><variables><name value="default">parameter</name></variables></analysis><analysis analysisName="QuoteValueRecorder" inuse="1"></analysis><analysis analysisName="IRDelta" inuse="1"><groupings><groupName>Cur rency</groupName><groupName>Product</groupName><groupName>Book</groupName><groupName>Counterparty</groupName><groupName>Strategy</groupName><groupName>Date</groupName></groupings><variables><name value="UpOneBp">parameter</name></variables></analysis><analysis analysisName="IRGamma" inuse="1"><groupings><groupName>Cur rency</groupName><groupName>Product</groupName><groupName>Book</groupName><groupName>Counterparty</groupName><groupName>Strategy</groupName><groupName>Date</groupName></groupings><variables><name value="Up2Bp-2Up1Bp">parameter</name></variables></analysis><analysis analysisName="IRVega" inuse="1"><groupings><groupName>Cur rency</groupName><groupName>Product</groupName><groupName>Book</groupName><groupName>Counterparty</groupName><groupName>Strategy</groupName><groupName>Date</groupName></groupings><variables><name value="IRVegaN">parameter</name></variables></analysis><analysis analysisName="CSDelta" inuse="1" pivot="true" treeview="true"><groupings><groupName& gt;Region</groupName><groupName>Industry</groupName><groupName>Currency</groupName><groupName>Issuer</groupName><groupName>Product</groupName><groupName>Country</groupName><groupName>Date</groupName></groupings><variables><name value="CS01Up">parameter</name></variables></analysis><analysis analysisName="CrossAssetPL" inuse="1"><variables><name value="default">parameter</name></variables></analysis><analysis analysisName="Scenario.Stress" inuse="1"><groupings><groupName>Cur rency</groupName><groupName>Product</groupName><groupName>Book</groupName><groupName>Counterparty</groupName><groupName>Strategy</groupName><groupName>Issuer</groupName><groupName>Date</groupName></groupings></analysis><analysis analysisName="Scenario.Credit_View" inuse="1" pivot="true" treeview="true"><groupings><groupName& gt;Region</groupName><groupName>Industry</groupName><groupName>Currency</groupName><groupName>Issuer</groupName><groupName>Product</groupName><groupName>Country</groupName><groupName>Date</groupName></groupings></analysis><analysis analysisName="IRDeltaZ" inuse="1"><groupings><groupName>Cur rency</groupName><groupName>Product</groupName><groupName>Book</groupName><groupName>Counterparty</groupName><groupName>Strategy</groupName><groupName>Date</groupName></groupings><variables><name value="IRDeltaZ">parameter</name></variables></analysis><analysis analysisName="Scenario.IRSlide" inuse="1"><groupings><groupName>Cur rency</groupName><groupName>Product</groupName><groupName>Book</groupName><groupName>Counterparty</groupName><groupName>Strategy</groupName><groupName>Date</groupName></groupings></analysis><analysis analysisName="HistSim" inuse="1" treeview="n/a"><parameters><parameter Horizon="1">Standard</parameter></parameters><groupings><groupName>To tal</groupName><groupName>RiskType</groupName><groupName>Currency</groupName><groupName>Product</groupName><groupName>Book</groupName><groupName>Date</groupName></groupings><variables><name label="Horizon" value="1 Day">horizon</name><name label="Confidence Level" value="95%">confidence</name><name label="Weighting" value="Equal">weighting</name><name value="Standard">parameter</name><name label="Observations" value="250">observations</name></variables></analysis><analysis analysisName="HistVaR" inuse="1" adhocOf="HistSim"><groupings><groupNam e>Total</groupName><groupName>Currency</groupName><groupName>Product</groupName><groupName>Book</groupName><groupName>Counterparty</groupName><groupName>Strategy</groupName><groupName>Issuer</groupName><groupName>Date</groupName></groupings><variables><name label="Horizon" value="1 Day">horizon</name><name label="Confidence Level" value="95%">confidence</name><name label="Weighting" value="Equal">weighting</name><name label="VaR Percentage" value="1">display</name><name label="Parameter" value="Standard">parameter</name><name label="Observations" value="250">observations</name></variables></analysis><analysis analysisName="MrgVaR" inuse="1" adhocOf="HistSim"><groupings><groupNam e>Currency</groupName><groupName>Product</groupName><groupName>Book</groupName><groupName>Counterparty</groupName><groupName>Strategy</groupName><groupName>Issuer</groupName></groupings><variables><name label="Horizon" value="1 Day">horizon</name><name label="Confidence Level" value="95%">confidence</name><name label="Weighting" value="Equal">weighting</name><name label="VaR Percentage" value="1">display</name><name label="Parameter" value="Standard">parameter</name><name label="Observations" value="250">observations</name></variables></analysis><analysis analysisName="IncrVaR" inuse="1" adhocOf="HistSim"><groupings><groupNam e>Currency</groupName><groupName>Product</groupName><groupName>Book</groupName><groupName>Counterparty</groupName><groupName>Strategy</groupName><groupName>Issuer</groupName></groupings><variables><name label="Horizon" value="1 Day">horizon</name><name label="Confidence Level" value="95%">confidence</name><name label="Weighting" value="Equal">weighting</name><name label="VaR Percentage" value="1">display</name><name label="Parameter" value="Standard">parameter</name><name label="Observations" value="250">observations</name></variables></analysis><analysis analysisName="BackTest" inuse="1" treeview="n/a" adhocOf="HypPL" overlapon="Std10d" class="backtesting"><groupings><groupN ame>Currency</groupName><groupName>RiskType</groupName><groupName>Product</groupName><groupName>Book</groupName></groupings><variables><name label="Observations" value="250">observations</name><name label="Horizon" value="1 Day">horizon</name><name label="From Date" value="2007-7-31" usevalue="true">fromdate</name><name label="One Tailed" value="false">one_tailed</name><name label="Confidence Level" value="95%">confidence</name><name label="Weighting" value="Equal">weighting</name><name label="Overlap Incr" value="1 Day">overlap</name><name label="Parameter" value="Standard">parameter</name><name label="Days" value="120" usevalue="false">days</name></variables></analysis><analysis analysisName="Capital" inuse="1" treeview="n/a" adhocOf="HistSim" class="riskcapital"><groupings><groupN ame>RiskType</groupName><groupName>Date</groupName></groupings><variables><name label="Horizon" value="10 Day">horizon</name><name label="Confidence Level" value="99%">confidence</name><name label="Weighting" value="Equal">weighting</name><name label="From Date" value="2007-7-31" usevalue="false">fromdate</name><name label="Scaling Factor" value="3.0">scale_factor</name><name label="Parameter" value="Standard">parameter</name><name label="Observations" value="250">observations</name><name label="Days" value="60" usevalue="true">days</name></variables></analysis><analysis analysisName="IRVegaDrv" inuse="1"><groupings><groupName>Cur rency</groupName><groupName>Product</groupName><groupName>Book</groupName><groupName>Counterparty</groupName><groupName>Strategy</groupName><groupName>Issuer</groupName><groupName>Date</groupName></groupings><variables><name value="default">parameter</name></variables></analysis><analysis analysisName="PricingReport" inuse="1"><parameters></parameters><variables><name value="default">parameter</name></variables></analysis></storedAnalyses></securedObject><securedObject scheme="urn:calypsom-com:scenario-parameters"><parameters><parameter> A_Gamma</parameter><parameter>archeus</parameter><parameter>Basis_shift</parameter><parameter>Basket_Shock</parameter><parameter>Bear_Flat</parameter><parameter>Bear_steep</parameter><parameter>Bull_Flattening</parameter><parameter>Bull_steepening</parameter><parameter>cds_multiplicative_s hift</parameter><parameter>Composite</parameter><parameter>corp_spread_widening </parameter><parameter>Correlation_shock&lt ;/parameter><parameter>credit_cons</parameter><parameter>credit_curve</parameter><parameter>Credit_View</parameter><parameter>Delta</parameter><parameter>Flattener</parameter><parameter>FX_shock</parameter><parameter>FX_Spot_Vol</parameter><parameter>FX_Vol_shock</parameter><parameter>Gamma</parameter><parameter>IR_Credit_Simul</parameter><parameter>IR_Range</parameter><parameter>IR_Range_Zero</parameter><parameter>IRDeltaN</parameter><parameter>mult_shift</parameter><parameter>Parallel_move</parameter><parameter>PFE</parameter><parameter>PFE_Forward</parameter><parameter>PFE_FX_Shock</parameter><parameter>PFE_IRshift</parameter><parameter>Recovery_shocks</parameter><parameter>spread_widen_mult&lt ;/parameter><parameter>spreads_seq_move</parameter><parameter>Steepener</parameter><parameter>Time_1Y_2Y</parameter><parameter>Vol_shocks</parameter></parameters></securedObject><securedObject scheme="urn:calypsom-com:scenario-mktset"><scenarioMktItems><mktItems&gt ;<mktitem>all_fx</mktitem><mktitem>all_ir</mktitem><mktitem>all_ir_cad</mktitem><mktitem>all_ir_credit</mktitem><mktitem>all_ir_usd</mktitem><mktitem>all_vol</mktitem><mktitem>Basis_curve</mktitem><mktitem>Correlation_Issuer</mktitem><mktitem>credit_curves</mktitem><mktitem>Credit_Recovery_curves&l t;/mktitem><mktitem>FX_Data</mktitem><mktitem>Quotes_Cash</mktitem><mktitem>Quotes_Equity</mktitem><mktitem>Quotes_FX</mktitem><mktitem>Vol_Bond</mktitem></mktItems><ruleItems><ruleitem>addit ive_shift_simul</ruleitem><ruleitem>additive_shift_ul</ruleitem><ruleitem>BASE</ruleitem><ruleitem>Bear_Flattener</ruleitem><ruleitem>Bear_Steepener</ruleitem><ruleitem>Bull_Flattener</ruleitem><ruleitem>Bull_Steepener</ruleitem><ruleitem>Bull_steepener_ul</ruleitem><ruleitem>Corr_up_10</ruleitem><ruleitem>credit_curve_rule</ruleitem><ruleitem>Equity_up_10</ruleitem><ruleitem>Equity_up_20</ruleitem><ruleitem>FX_10_Mult</ruleitem><ruleitem>FX_10percent</ruleitem><ruleitem>FX_Matrix_Shocks</ruleitem><ruleitem>fx_usd_jpy_dn_5</ruleitem><ruleitem>fx_usd_jpy_up_5</ruleitem><ruleitem>Ir_Credit_Simul</ruleitem><ruleitem>mult_shift_simul</ruleitem><ruleitem>multiple_sets</ruleitem><ruleitem>Quotes_additive</ruleitem><ruleitem>Quotes_mult</ruleitem><ruleitem>seq1bpdn</ruleitem><ruleitem>seq1bpup</ruleitem><ruleitem>seq_additive</ruleitem><ruleitem>seqzero1bp</ruleitem><ruleitem>simul10bpdn</ruleitem><ruleitem>simul10bpup</ruleitem><ruleitem>simul1bp</ruleitem><ruleitem>simul1bp_ul</ruleitem><ruleitem>simul1bpdn</ruleitem><ruleitem>simul1bpdn_zero</ruleitem><ruleitem>simul1bpup</ruleitem><ruleitem>simul1bpup_zero</ruleitem><ruleitem>STB_Requirements</ruleitem><ruleitem>Steepener</ruleitem><ruleitem>Time_1Y_2Y</ruleitem><ruleitem>ul_1bp_10y</ruleitem><ruleitem>ul_1bp_1y</ruleitem><ruleitem>ul_1bp_2y</ruleitem><ruleitem>ul_1bp_3y</ruleitem><ruleitem>ul_1bp_4y</ruleitem><ruleitem>ul_1bp_50y</ruleitem><ruleitem>ul_1bp_5y</ruleitem><ruleitem>ul_1bp_6y</ruleitem><ruleitem>ul_1bp_7y</ruleitem><ruleitem>ul_1bp_8y</ruleitem><ruleitem>ul_1bp_9y</ruleitem><ruleitem>ul_simul_5</ruleitem><ruleitem>ul_simul_dn_10</ruleitem><ruleitem>ul_simul_dn_5</ruleitem><ruleitem>ul_ten_percent_shift&l t;/ruleitem><ruleitem>underlyings_additive_s hift</ruleitem><ruleitem>underlyings_multiplica tive_shift</ruleitem><ruleitem>Vol_dn_10</ruleitem><ruleitem>Vol_dn_20</ruleitem><ruleitem>Vol_shocks</ruleitem><ruleitem>Vol_shocks_fx</ruleitem><ruleitem>Vol_up_10</ruleitem><ruleitem>Vol_up_20</ruleitem></ruleItems></scenarioMktItems></securedObject><securedObject scheme="urn:calypsom-com:view-parameters"><viewParameters><item>& lt;name>limitMode</name><value>0</value></item><item><name>offsetDate</name><value>-1</value></item></viewParameters><GUIConfigs></GUIConfigs></securedObject><securedObject scheme="urn:calypsom-com:risk-class"><riskclasses><classname classtype="1">tk.risk.sim.ShiftItemBasketCorrel ation</classname><classname classtype="1">tk.risk.sim.ShiftItemBondPrice&lt ;/classname><classname classtype="1">tk.risk.sim.ShiftItemCDSIndexSpre ad</classname><classname classtype="1">tk.risk.sim.ShiftItemCap</classname><classname classtype="1">tk.risk.sim.ShiftItemCommodityPri ce</classname><classname classtype="1">tk.risk.sim.ShiftItemCorrelationS urface</classname><classname classtype="1">tk.risk.sim.ShiftItemCurveBasis&l t;/classname><classname classtype="1">tk.risk.sim.ShiftItemCurveBorrow& lt;/classname><classname classtype="1">tk.risk.sim.ShiftItemCurveCommodi ty</classname><classname classtype="1">tk.risk.sim.ShiftItemCurveCommodi tySpread</classname><classname classtype="1">tk.risk.sim.ShiftItemCurveConveni enceYield</classname><classname classtype="1">tk.risk.sim.ShiftItemCurveDividen d</classname><classname classtype="1">tk.risk.sim.ShiftItemCurveFX</classname><classname classtype="1">tk.risk.sim.ShiftItemCurveInflati on</classname><classname classtype="1">tk.risk.sim.ShiftItemCurvePreciou sMetal</classname><classname classtype="1">tk.risk.sim.ShiftItemCurveProbabi lity</classname><classname classtype="1">tk.risk.sim.ShiftItemCurveRepo&lt ;/classname><classname classtype="1">tk.risk.sim.ShiftItemCurveZero&lt ;/classname><classname classtype="1">tk.risk.sim.ShiftItemCurveZeroFXD erived</classname><classname classtype="1">tk.risk.sim.ShiftItemEquity</classname><classname classtype="1">tk.risk.sim.ShiftItemEquityOption s</classname><classname classtype="1">tk.risk.sim.ShiftItemFX</classname><classname classtype="1">tk.risk.sim.ShiftItemFXVolatility Surface</classname><classname classtype="1">tk.risk.sim.ShiftItemFloor</classname><classname classtype="1">tk.risk.sim.ShiftItemFutureOption s</classname><classname classtype="1">tk.risk.sim.ShiftItemFuturePrice& lt;/classname><classname classtype="1">tk.risk.sim.ShiftItemVolatilitySu rface3D</classname><classname classtype="2">tk.risk.sim.conditional.IsCurrenc y</classname><classname classtype="2">tk.risk.sim.conditional.IsIndex&l t;/classname><classname classtype="2">tk.risk.sim.conditional.IsName&lt ;/classname></riskclasses></securedObject><securedObject scheme="urn:calypso-com:scenario-weighting"><weightingMechanisms></weightingMechanisms></securedObject></securedObjects></permission>

  4. #4
    Junior Member
    Join Date
    Aug 2006
    Location
    london
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Help with QTP code

    Sorry Chikki

    Since I cannot find the attachment option I just included the text for 3 xml files in the reply.

    Thank you for the response and wait to hear from you.

  5. #5
    Super Member
    Join Date
    Dec 2005
    Location
    USA
    Posts
    1,407
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: Help with QTP code

    maruti,

    it seems there are 4 xmls files you have pasted. can you what you want to do and if possible attach the xml files
    ------------
    Chikki
    when things gets harder ,the harder gets going

  6. #6
    Junior Member
    Join Date
    Aug 2006
    Location
    london
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Help with QTP code

    Hi Chikki

    My Scenario is:

    1. Compare the Xml files in Post folder with the Pre folder (say I got 20 files in each folder)
    2. Say, If there is a difference b/w files 2, 10 in Post folder with 2,10 files in Pre folder, I want those mismatch files be written in a separate file called Error in a folder say Result.

    At the moment what is happening the mismatch file 2 content from the post folder is being written in the result folder, error file but when it found the mismatch in file 10 then the content from the file 10 in Post folder is over writting the already existing content in the error file but I want the new information be appended rather over written.

    Hope that's clear if you need further info please let me know.
    Thank you for the help
    Below are the xml files
    ---------------------------------------------------
    1.<jobs><batchCompleted>false</batchCompleted><items></items></jobs> --> Pre <jobs><batchCompleted>True</batchCompleted><items></items></jobs> -->Post
    2.<items></items> --> Pre; <items></items> --> Post
    3.<items><item><run_id>1003</run_id><analysis>HistSim.Standard</analysis><portfolio>QTP_Trades</portfolio><value_date>14914</value_date></item><item><run_id>1026</run_id><analysis>ProfitLoss.Standard</analysis><portfolio>QTP_Trades</portfolio><value_date>14914</value_date></item><item><run_id>1027</run_id><analysis>IRDelta.IRDeltaN</analysis><portfolio>QTP_Trades</portfolio><value_date>14914</value_date></item><item><run_id>1054</run_id><analysis>HistSim.Standard</analysis><portfolio>QTP_Trades</portfolio><value_date>14914</value_date></item><item><run_id>1055</run_id><analysis>HistSim.Standard</analysis><portfolio>QTP_Trades</portfolio><value_date>14914</value_date></item><item><run_id>1056</run_id><analysis>HistSim.Standard</analysis><portfolio>QTP_Trades</portfolio><value_date>14914</value_date></item><item><run_id>1057</run_id><analysis>HistSim.Standard</analysis><portfolio>QTP_Trades</portfolio><value_date>14914</value_date></item><item><run_id>1058</run_id><analysis>HistSim.Standard</analysis><portfolio>QTP_Trades</portfolio><value_date>14914</value_date></item><item><last_updated>2010-11-17 16:11:13</last_updated></item></items> --> Pre;
    <items><item><run_id>1003</run_id><analysis>HistSim.Standard</analysis><portfolio>QTP_Trades</portfolio><value_date>14914</value_date></item><item><run_id>1026</run_id><analysis>ProfitLoss.Standard</analysis><portfolio>QTP_Trades</portfolio><value_date>14914</value_date></item><item><run_id>1027</run_id><analysis>IRDelta.IRDeltaN</analysis><portfolio>QTP_Trades</portfolio><value_date>14914</value_date></item><item><run_id>1054</run_id><analysis>HistSim.Standard</analysis><portfolio>QTP_Trades</portfolio><value_date>14914</value_date></item><item><run_id>1055</run_id><analysis>HistSim.Standard</analysis><portfolio>QTP_Trades</portfolio><value_date>14914</value_date></item><item><run_id>1056</run_id><analysis>HistSim.Standard</analysis><portfolio>QTP_Trades</portfolio><value_date>14914</value_date></item><item><run_id>1057</run_id><analysis>HistSim.Standard</analysis><portfolio>QTP_Trades</portfolio><value_date>14914</value_date></item><item><run_id>1058</run_id><analysis>HistSim.Standard</analysis><portfolio>QTP_Trades</portfolio><value_date>14914</value_date></item><item><last_updated>2010-11-17 16:11:13</last_updated></item></items> --> Post

    4. <results timestamp="2009-04-16 23:59:59"></results> --> Pre; <results timestamp="2009-04-16 23:59:59"></results>--> Post

    Please let me know if you need further info

  7. #7
    Advanced Member
    Join Date
    May 2007
    Posts
    609
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0

    Re: Help with QTP code

    oXML2.save("C:\ERSTest\QTP\QTP_TASK\Result\errorfi le.txt")

    That line in your code is overwriting your results file every time with the newest comparison. It doesn't have an append mode. If you want to have all the results in one file, you should do something like this:

    oXML2.save("C:\ERSTest\QTP\QTP_TASK\Result\tempfil e.txt")

    Set TempFile = fileSource.OpenTextFile("C:\ERSTest\QTP\QTP_TASK\R esult\tempfile.txt", 8, True)
    do while not TempFile.EndOfFile
    line = TempFile.ReadLine
    err_update line, errfile
    TempFile.ReadLine
    loop
    TempFile.Close
    fileSource.DeleteFile("C:\ERSTest\QTP\QTP_TASK\Res ult\tempfile.txt")


    This might not be perfect code, as I'm just throwing it out from memory but I think it'll give you the logic you need.
    Dennis Belew

  8. #8
    Junior Member
    Join Date
    Aug 2006
    Location
    london
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Help with QTP code

    Hi Belewda

    First thank you for the logic provided,which nearly worked but I am afraid not in total. I have updated the code as below on your advice.But the error is in line "DO While not Tempfile.EndOfFile" is not working as QTP is not supporting the EndOfFile property. Below are the list of supported properties for the TempFile:"AtEndOfLine/AtEndOfStream/Close/Column/Line/Read/ReadAll/ReadLine/Skip/SkipLine/Write/WriteLine/WriteBlankLines)

    Below is how the modified code is:

    oXML2.save("C:\ERSTest\QTP\QTP_TASK\Result\tempfil e.txt")

    Set TempFile= fso.OpenTextFile("C:\ERSTest\QTP\QTP_TASK\Result\t empfile.txt", 8, True)

    Do while NOT TempFile.ReadAll

    line = TempFile.ReadLine

    err_update line, errfile

    TempFile.ReadLine

    loop

    TempFile.Close

    fso.DeleteFile("C:\ERSTest\QTP\QTP_TASK\Result\tem pfile.txt")

  9. #9
    Member
    Join Date
    Jan 2009
    Location
    Canberra
    Posts
    273
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Help with QTP code

    Checkout This post which is a function that makes use of the XMLUtil object that we have access to in QTP.

    It may do what you want.

    Function XMLFileCompare(pFile1, pFile2, pDifferencesFile)
    Returns true if the two XML files pFile1 and pFile2 are the same.
    Returns false if the two XML files are different. If they are different it writes an XML file showing the differences to pDifferencesFile'

  10. #10
    Advanced Member
    Join Date
    May 2007
    Posts
    609
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0

    Re: Help with QTP code

    After looking at the available methods of Tempfile, I think you should be able to do this:

    oXML2.save("C:\ERSTest\QTP\QTP_TASK\Result\tempfil e.txt")

    Set TempFile= fso.OpenTextFile("C:\ERSTest\QTP\QTP_TASK\Result\t empfile.txt", 8, True)

    line = TempFile.ReadAll

    err_update line, errfile

    TempFile.Close

    fso.DeleteFile("C:\ERSTest\QTP\QTP_TASK\Result\tem pfile.txt")

    You shouldn't need the loop at all if you can do ReadAll without any errors.
    Dennis Belew

 

 
Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 12:09 AM.

Copyright BetaSoft Inc.