Top-rated recipes tagged "shrouding"http://code.activestate.com/recipes/tags/shrouding/top/2010-12-15T18:57:42-08:00ActiveState Code RecipesConvert XML files to structurally equivalent garbage (Python) 2010-12-15T18:57:42-08:00Eric Promislowhttp://code.activestate.com/recipes/users/4166930/http://code.activestate.com/recipes/577501-convert-xml-files-to-structurally-equivalent-garba/ <p style="color: grey"> Python recipe 577501 by <a href="/recipes/users/4166930/">Eric Promislow</a> (<a href="/recipes/tags/randomization/">randomization</a>, <a href="/recipes/tags/shrouding/">shrouding</a>, <a href="/recipes/tags/xml/">xml</a>). </p> <p>You've found a bug in an application that reads XML files. You'd prefer not to share your data, though, but you'd really like to help the vendor fix the bug. This program maintains the document's structure, but it randonly converts each word into random gibberish, replacing vowels with vowels, consonants with consonants, and digits with digits. It also interns each element and attribute name, so all instances of "foo" as an element or attribute name would show up as, say, "xeu", but instances of "foo" in character data would be mapped to a different string each time.</p>