SparkoUK

writing xml ' as &quote; in attribute

4 posts in this topic

I am trying to write an attribute value in an xml file that needs single quotes modified to &quote;.  I am using _XMLDomWrapper.au3 currently via

_XMLSetAttrib($xmlClientIdParamValue, "value", "'" & $ClientIDx & "'")

but this does not encode the single quote.  If I true to make it

_XMLSetAttrib($xmlClientIdParamValue, "value", "&quote;" & $ClientIDx & "&quote;")

then the & gets encoded to &

Anyone please help me to get the single quote encoded in there?

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

If your just replacing a string why not use:

StringReplace

:)

Edited by MikahS

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites

OOps meant double quote essentially "

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now