我在 TSQL 中有 XML,
Declare @xml XML = '<soap:Envelope xmlns:q1="urn:customization_2015_2.setup.webservices.netsuite.com" xmlns:urn1="urn:core_2015_2.platform.webservices.netsuite.com" xmlns:urn="urn:messages_2015_2.platform.webservices.netsuite.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body xmlns:q1="urn:customization_2015_2.setup.webservices.netsuite.com" xmlns:urn1="urn:core_2015_2.platform.webservices.netsuite.com" xmlns:urn="urn:messages_2015_2.platform.webservices.netsuite.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<upsertList>
<q1:record xmlns:q1="urn:customization_2015_2.setup.webservices.netsuite.com" xsi:type="q1:CustomRecord" externalId="F95C35CF-950E-4756-8C33-43CA0C47FF45">
<q1:recType internalId="12" type="customRecord"/>
<q1:customFieldList xmlns="urn:core_2015_2.platform.webservices.netsuite.com">
<customField scriptId="custrecord_sps_content_package" xsi:type="SelectCustomFieldRef">
<value internalId="25"/>
</customField>
<customField scriptId="custrecord_sps_content_item" xsi:type="SelectCustomFieldRef">
<value internalId="1849"/>
</customField>
<customField scriptId="custrecord_sps_content_qty" xsi:type="LongCustomFieldRef">
<value>6.00</value>
</customField>
</q1:customFieldList>
</q1:record>
<q1:record xmlns:q1="urn:customization_2015_2.setup.webservices.netsuite.com" externalId="D596F4DB-D7FE-409A-9D40-916FF88FB188">
<q1:recType internalId="12" type="customRecord"/>
<q1:customFieldList xmlns="urn:core_2015_2.platform.webservices.netsuite.com">
<customField scriptId="custrecord_sps_content_package" xsi:type="SelectCustomFieldRef">
<value internalId="24"/>
</customField>
<customField scriptId="custrecord_sps_content_item" xsi:type="SelectCustomFieldRef">
<value internalId="1902"/>
</customField>
<customField scriptId="custrecord_sps_content_qty" xsi:type="LongCustomFieldRef">
<value>2.00</value>
</customField>
</q1:customFieldList>
</q1:record>
</upsertList>
</soap:Body>
</soap:Envelope>'
现在,我想找到 customField 具有属性 => xsi:type="LongCustomFieldRef" 然后将值更新为整数。意思是我想要 Integer: 6 而不是 6.00
<customField scriptId="custrecord_sps_content_qty" xsi:type="LongCustomFieldRef">
<value>6</value>
</customField>