在xpath中使用字符串函数返回值和新行
我在VB.Net工作流中使用的xpath表达式格式如下: 字符串(xpath) 它返回我期望的字符串值,但在值后面还有一个新行字符,它破坏了我的逻辑 我怎样才能摆脱那条新线路 有什么建议吗 如有需要,请提供更多信息: 规范化空间仍在返回新行。 xml太大,因此将代码段粘贴到其直接父项下:在xpath中使用字符串函数返回值和新行,xpath,Xpath,我在VB.Net工作流中使用的xpath表达式格式如下: 字符串(xpath) 它返回我期望的字符串值,但在值后面还有一个新行字符,它破坏了我的逻辑 我怎样才能摆脱那条新线路 有什么建议吗 如有需要,请提供更多信息: 规范化空间仍在返回新行。 xml太大,因此将代码段粘贴到其直接父项下: <Characteristic_Value_Population_Rule_SpecChar_Value_Population_Rule ID="f0baf095-5e84-4146-9c72-76912
<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>
调制解调器ADSL/VDSL/TV/PSTN b-box 3 0
000006,000069,000078
调制解调器ADSL/VDSL2/TV/Italk/off b盒2 039
000006,000069,000077
收购类型为Belgacom互联网背景下的租赁
收购类型为Belgacom互联网背景下的租赁
租
假的
采集类型
我试图获取值c5dec18e-806c-46d1-8294-e83117650b5b,xpath表达式返回该值,但带有新行
我现在正在使用xpath:
字符串(规范化空间(//Package/Characteristic\u Value\u Population\u Rule\u SpecChar\u Population\u Rule/Characteristic/Specification\u Characteristic/@ID))尝试
字符串(规范化空间(xpath))
。如果这没有帮助,那么向我们显示更多上下文。如果属性值不包含新行,则XPath不会添加新行。在示例中,ID=“c5dec18e-806c-46d1-8294-e83117650b5b”
没有显示任何新行和doing字符串(//Package/Characteristic\u Value\u Population\u Rule\u SpecChar\u Value\u Population\u Rule/Characteristic/Specification\u Characteristic/@ID)
应该为您提供值c5dec18e-806c-46d1-8294-e83117650b5b
。如果您有一个新行,那么问题在别处,或者输入不同。在VB中,您使用哪个API来计算XPath表达式?