As David said, editing HTML via sed is complicated.
Here are two sed's that work with your sample data. You might have to add appropriate [[:blank:]]* in the regEx if, e. g., there were spaces like in
In case {Article} is really just one line:
Code:
sed -r '/<title>Replacer<\/title>/ {:a N;/<!--Not:/ {h;b};/\n<!--[^\n]+$/ ba};/\{Article\}/ {x;s/.*<!--Not:(.*)-->$/\1/;t;x};' file
Or if there are several lines between the <body> tags:
Code:
sed -r '/<title>Replacer<\/title>/ {:a N;/<!--Not:/ {h;b};/\n<!--[^\n]+$/ ba};/<body>/ {:b N; /<\/body>/! bb; x;s/.*<!--Not:(.*)-->$/<body>\n\1\n<\/body>/;t;x};' file
If "<!--Not" is present {Article} will be replaced, otherwise not.
If your data is not strictly arranged as in your sample then you should consider using an HTML parser.
[EDIT]
Notice, that the above sed statements edit the file. Do not echo the variable via pipe into it. They both will not work if you echo the file as a single huge line into a pipe.