我有如下字符串:
细绳:
"//cXML/Request/OrderRequest/ItemOut[]/ItemDetail/Extrinsic[]/home/idea[]"
如果我用“[]”分隔字符串,那么输出应该是这样的
输出:
//cXML/Request/OrderRequest/ItemOut[]
/ItemDetail/Extrinsic[]
/home/idea[]
有时我的字符串如下所示:
string: "//cXML/Request/OrderRequest/ItemOut[]/@quantity"
然后输出应该如下所示
输出:
//cXML/Request/OrderRequest/ItemOut[]
/@quantity