在xpath中使用String函数将返回值和一行新行



我在VB.Net工作流中使用以下格式作为xpath表达式:

字符串(xpath)

它给我返回了预期的字符串值,但在值后面还有一个换行符,这打破了我的逻辑。

我该如何摆脱那条新线路?

有指针吗?

根据要求提供更多信息:

规范化空间仍在返回新行。xml太大了,所以将该片段粘贴到它的直接父项下:

<Characteristic_Value_Population_Rule_SpecChar_Value_Population_Rule ID="f0baf095-5e84-4146-9c72-7691205df16b" xsi:type="SpecChar_Value_Population_Rule" Pattern="T_RelatedEntityRule">
    <Entity_T_RelatedEntityGroup_AND ID="a9adc94f-615b-477b-8841-94887429a83e" xsi:type="T_RelatedEntityGroup_AND" Pattern="TRelated_EntityGroup">
        <Entities_TRule_Value_EntityRef ID="f521569f-41a3-42ad-9974-3aea9557460b" xsi:type="TRule_Value_EntityRef" Pattern="TRule_Complex_Value">
            <Name>Modem ADSL/VDSL/TV/PSTN b-box 3 0</Name>
            <Entity>000006,000069,000078</Entity>
        </Entities_TRule_Value_EntityRef>
        <Entities_TRule_Value_EntityRef ID="9025dfc0-bd7d-4252-8dad-f95a818b8688" xsi:type="TRule_Value_EntityRef" Pattern="TRule_Complex_Value">
            <Name>Modem ADSL/VDSL2/TV/Italk/off b-box 2 039</Name>
            <Entity>000006,000069,000077</Entity>
        </Entities_TRule_Value_EntityRef>
        <Name>Acquisition Type is Rent in the context of Belgacom Internet</Name>
    </Entity_T_RelatedEntityGroup_AND>
    <Name>Acquisition Type is Rent in the context of Belgacom Internet</Name>
    <Characteristic ID="ae3f9304-31a7-4c0b-8723-c553b136410e" Pattern="TSpecChar" OrigType="SpecCharItem">
        <Specification_Characteristic ID="c5dec18e-806c-46d1-8294-e83117650b5b" Pattern="TSpecCharValue" OrigType="SpecCharValueItem">
            <Value>Rent</Value>
            <IsUserDefinedValue>false</IsUserDefinedValue>
        </Specification_Characteristic>
        <Name>Acquisition Type</Name>
    </Characteristic>
</Characteristic_Value_Population_Rule_SpecChar_Value_Population_Rule>
</Package>

我正在尝试获取值c5dec18e-806c-46d1-8294-e83117650b5b,xpath表达式确实返回了该值,但使用了新行。

我现在使用的是xpath:字符串(规范化空间(//Package/Characteric_Value_Population_Rule_SpecChar_Value_Population-Rule/Charactic/Description_Characteritic/@ID))

尝试String(normalize-space(xpath))。如果这没有帮助,那么向我们展示更多的背景。

最新更新