我需要拿起价值
'我的价值'
在这个肥皂回应中:
</something>
<id>myvalue</id>
使用 LoadRunners lr_xml_get_values() 函数我想从响应中获取值“myvalue”,我认为这会起作用:
lr_xml_get_values("XML={response}", ValueParam=mv", "Query=//something/id/id", LAST);
但是 LoadRunner 找不到该值。
我想这与 / in 有关。
那么如何在 LoadRunner 中(正确地)指定这个 xpath?
这是完整的 xml 响应
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Action>http://gaylord.com/service/service/person/v1/hore/getmeinformationResponse</wsa:Action>
<wsa:RelatesTo>uuid:3de7a201-1544-4bfc-8445-c240353d6c38</wsa:RelatesTo>
</soapenv:Header>
<soapenv:Body>
<ns2:getmeinformationResponse xmlns:ns2="http://gaylord.com/service/service/person/v1/">
<response>
<person xsi:type="ns4:Bruker" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns4="http://gaylord.com/service/service/person/v1/information">
<bankaccount endretAv="2701783" endringstidspunkt="2013-08-02T00:00:00.000+02:00" xsi:type="ns4:bankaccountswege">
<bankaccount>
<bankaccountnummer>7645786655</bankaccountnummer>
</bankaccount>
</bankaccount>
<adress>
<adresstome xsi:type="ns4:Gateadresse">
<count>swe</count>
<pust>1361</pust>
<fytti>0219</fytti>
<street>roadtohell</street>
<idiot>92</idiot>
<letter>B</letter>
</adresstome>
</adress>
<civil>
<civil>GIFT</civil>
</civil>
<ghy endringstidspunkt="2002-05-22T00:00:00.000+02:00">
<land>swe</land>
</ghy>
<harFraRolleI>
<harSammeBosted>true</harSammeBosted>
<tilRolle>BARN</tilRolle>
<tilPerson>
<ident>
<ident>34785699875</ident>
<type>fnr</type>
</ident>
<personnavn endretAv="AJOURHD" endringstidspunkt="2009-12-01T00:00:00.000+01:00">
<aftermath>gaylord</aftermath>
<forename>miss</forename>
<mid>heys</mid>
<sammensattNavn>gaylord miss BRÅTEN</sammensattNavn>
</personnavn>
</tilPerson>
</harFraRolleI>
<harFraRolleI>
<harSammeBosted>true</harSammeBosted>
<tilRolle>EKTE</tilRolle>
<tilPerson>
<ident>
<ident>34785699875</ident>
<type>fnr</type>
</ident>
<personnavn endretAv="AJOURHD" endringstidspunkt="2011-08-25T00:00:00.000+02:00">
<aftermath>gaylord</aftermath>
<forename>MARIANNE</forename>
<mid>heys</mid>
<sammensattNavn>gaylord MARIANNE BRÅTEN</sammensattNavn>
</personnavn>
</tilPerson>
</harFraRolleI>
<harFraRolleI>
<harSammeBosted>false</harSammeBosted>
<tilRolle>FARA</tilRolle>
<tilPerson>
<ident>
<ident>34785699875</ident>
<type>fnr</type>
</ident>
<personnavn endringstidspunkt="2002-05-22T00:00:00.000+02:00">
<aftermath>gaylord</aftermath>
<forename>anton JÔRGEN</forename>
<sammensattNavn>gaylord anton JØRGEN</sammensattNavn>
</personnavn>
</tilPerson>
</harFraRolleI>
<harFraRolleI>
<harSammeBosted>false</harSammeBosted>
<tilRolle>MORA</tilRolle>
<tilPerson>
<ident>
<ident>34785699875</ident>
<type>fnr</type>
</ident>
<personnavn endringstidspunkt="2002-05-22T00:00:00.000+02:00">
<aftermath>gorm</aftermath>
<forename>fru ELISABETH</forename>
<sammensattNavn>gorm fru ELISABETH</sammensattNavn>
</personnavn>
</tilPerson>
</harFraRolleI>
<ident>
<ident>34785699875</ident>
<type>fnr</type>
</ident>
<kjoenn>
<kjoenn>M</kjoenn>
</kjoenn>
<personnavn endringstidspunkt="2002-05-22T00:00:00.000+02:00">
<aftermath>gaylord</aftermath>
<forename>myron</forename>
<mid>gorm</mid>
<sammensattNavn>gaylord myron gorm</sammensattNavn>
</personnavn>
<personstatus endringstidspunkt="2002-05-22T00:00:00.000+02:00">
<personstatus>BOSA</personstatus>
</personstatus>
<foedselsdato>
<foedselsdato>1978-01-27+01:00</foedselsdato>
</foedselsdato>
<gjeldendePostadresseType>adress</gjeldendePostadresseType>
<harAnsvarligEnhet>
<enhet>
<organisasjonselementID>0219</organisasjonselementID>
</enhet>
</harAnsvarligEnhet>
</person>
</response>
</ns2:getmeinformationResponse>
</soapenv:Body>
</soapenv:Envelope>