0
我覺得有幾個XPath表達式,如:自定義分割操作
loan:_applicant/base:_entity/person:_locations/base:SmartRefOfLocationeJDvviUx[base:_entity/contact:_category/base:_underlyingValue='Personal' and base:_entity/contact:_confirmedByResident/common:_isConfirmed/base:_underlyingValue='true' and base:_entity/base:_process/base:_entity/base:_id/base:_underlyingValue = /loan:Application/base:_process/base:_entity/base:_id/base:_underlyingValue]/base:_entity/base:_id/base:_underlyingValue
我嘗試使用/base:_entity
部分這些表達式拆分爲這樣的分配器:
string[] stringSeparators = new string[] { "/base:_entity" };
string[] pathTokens = xPath.Split(stringSeparators, StringSplitOptions.None);
但我需要防止分裂當/base:_entity
介於[
和]
個字符之間時。
我有可能產生以下字符串數組爲我寫了上面的示例表達式輸出是:
"loan:_applicant"
"/person:_locations/base:SmartRefOfLocationeJDvviUx
[base:_entity/contact:_category/base:_underlyingValue='Personal' and base:_entity/contact:_confirmedByResident/common:_isConfirmed/base:_underlyingValue='true' and base:_entity/base:_process/base:_entity/base:_id/base:_underlyingValue = /loan:Application/base:_process/base:_entity/base:_id/base:_underlyingValue]"
"/base:_id/base:_underlyingValue"
你有什麼建議嗎?
感謝您的回答! – anilca