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=&apos;test part&apos;]]</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=&apos;part&apos;s test&apos;]]</actionexpression> 

is there way delimit actual apostrophe in value here?


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -