XML xPath with apostrophes trouble -
i sending xml messages update records in new software system. xpath uses apostrophes around id value. problem value potentially contain apostrophe.
example:
this works fine when id value doesnt have apostrophe:
<sync>      <actioncriteria>           <actionexpression actioncode="add">/syncitemmaster/dataarea/itemmaster[itemmasterheader/itemid[id='test part']]</actionexpression>      </actioncriteria> </sync> <itemmaster>     <itemmasterheader>         <itemid>             <id>test part</id>             <revisionid>000</revisionid>         </itemid>   so when have id value apostrophe, fails.
i.e. id = part's test gives fails when being read software system.
<actionexpression actioncode="add">/syncitemmaster/dataarea/itemmaster[itemmasterheader/itemid[id='part's test']]</actionexpression>   is there way delimit actual apostrophe in value here?
 
 
Comments
Post a Comment