regular expression xml help please

From: adidev (patrongp_at_yahoo-dot-com.no-spam.invalid)
Date: 06/10/04


Date: 9 Jun 2004 20:24:52 -0500

hello,

anyone know how to return any quotes used inside a text node?

for example:

<node1>This is my text node, my quote "quote" is
here</node1>

what i want to do is escape those " with &apos; through the use of
regular expressions

the string i will be operating on is an xml document represented as a
string so there will be multiple nodes per line, etc. when replacing
" with &quot; i do not want to replace attribute " eg. <node1
myattrb="blah"> ( i want to leave these alone )

 Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
    ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
                http://www.usenet.com



Relevant Pages

  • Re: [PHP] str_replace oddity
    ... it uses backslashes to escape where the quotes were. ... but the ghost remains and mysql continues to escape them. ... is $string honestly something that you are getting via a form submit? ...
    (php.general)
  • Re: setTimeout
    ... JavaScript doesn't resolve variables in double quotes (nor in apos). ... 1.5sec later not_Working function is simply being called with string ... global context. ...
    (comp.lang.javascript)
  • Re: [PHP] str_replace oddity
    ... it uses backslashes to escape where the quotes were. ... but the ghost remains and mysql continues to escape them. ... is $string honestly something that you are getting via a form submit? ...
    (php.general)
  • Re: compilation error message on tomcat 5.5.27
    ... What does your error message say? ... either escape any double quotes used within the string, ...
    (comp.lang.java.programmer)
  • Re: Problems replacing with \
    ... > return string ... If you wrap a raw string in just quotes that is isn't a raw string any ... why do you want to escape the text yourself? ...
    (comp.lang.python)