bingoldsby
Technical User
In another discussion on this board
(I have been trying to find a way to take the output of an HTML form (one field - email address) and add it into a section of an existing XML document. That doc is a whitelist - part of an email filter set in xml.
I don't want programming advice (I'm not a perl programmer and couldn't use it). I need the whole perl script, which will look for a specific line like this:
<expression casesensitive="no" type="regex" onmatch="score += 1">zyxxxyz</expression>
...or just the part "zyxxxyz," and replace it with that same line + cr/lf + that line again, but with the email address gathered from the form field in place of the zyxxxyz.
I have been trying to use a perl script which will search and replace text in any text document (which xml is), using a form which contains the text to search for (that whole "expression" line) contained in a hidden input form field, but the punctuation of the xml line interferes with the html in the form and everything breaks after that.
My guess is that the form should only gather the email address, send it to the script, and the script find the same line each time and make the addition, then rewrite the rest of the xml file. There is no efficiency issue what-so-ever, as the addition of an email address to the xml whitelist will only be done form the local network at our organization (Union Gospel Mission - Yakima, WA) and only occassionally at that.
If someone has a solution, I'd deeply appreciate having it. My next approach is to offer money. (But don't forget, we're a non-profit charitable organization - with little extra money to spend).
Hope this explanation is clear enough.
Thanks,
Brian
(I have been trying to find a way to take the output of an HTML form (one field - email address) and add it into a section of an existing XML document. That doc is a whitelist - part of an email filter set in xml.
I don't want programming advice (I'm not a perl programmer and couldn't use it). I need the whole perl script, which will look for a specific line like this:
<expression casesensitive="no" type="regex" onmatch="score += 1">zyxxxyz</expression>
...or just the part "zyxxxyz," and replace it with that same line + cr/lf + that line again, but with the email address gathered from the form field in place of the zyxxxyz.
I have been trying to use a perl script which will search and replace text in any text document (which xml is), using a form which contains the text to search for (that whole "expression" line) contained in a hidden input form field, but the punctuation of the xml line interferes with the html in the form and everything breaks after that.
My guess is that the form should only gather the email address, send it to the script, and the script find the same line each time and make the addition, then rewrite the rest of the xml file. There is no efficiency issue what-so-ever, as the addition of an email address to the xml whitelist will only be done form the local network at our organization (Union Gospel Mission - Yakima, WA) and only occassionally at that.
If someone has a solution, I'd deeply appreciate having it. My next approach is to offer money. (But don't forget, we're a non-profit charitable organization - with little extra money to spend).
Hope this explanation is clear enough.
Thanks,
Brian