Menu

[r11]: / trunk / SWFInvestigator / src / help / utils / fuzz.html  Maximize  Restore  History

Download this file

34 lines (33 with data), 1.3 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<HTML>
<!--
/****************************************************************************
* ADOBE SYSTEMS INCORPORATED
* Copyright 2012 Adobe Systems Incorporated and it’s licensors
* All Rights Reserved.
*
* NOTICE: Adobe permits you to use, modify, and distribute this file
* in accordance with the terms of the license agreement accompanying it.
* ****************************************************************************/
-->
<BODY>
<DIV id="targetDiv" style="font-family:fixed;white-space:pre;">
</DIV>
<SCRIPT type="text/javascript">
function insertLiteral(literalString, targetElement)
{
var textNode = document.createTextNode(literalString);
targetElement.appendChild(textNode)
return textNode;
}
// test it (for the example, I assume #targetDiv is there but empty)
//var xmlString = "<this><is_some><xml with='attributes' /></is_some></this>";
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET", "fuzz.xml", false);
xmlhttp.setRequestHeader('Content-Type', 'text/xml');
xmlhttp.send("");
var xmlDoc = xmlhttp.responseText;
var targetElement = document.getElementById("targetDiv");
var xmlTextNode = insertLiteral(xmlDoc, targetElement);
</script>
</BODY>
</HTML>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.