The .html () function from jQuery turns my XML code into lowercase.
Is there any other method, so I can get exactly the result that I expect?
html = $('pre').html();
The goal is to get the following conclusion:
<ok:List Title="HelloWorld"></ok>
What I get:
<ok:List Title="HelloWorld"></ok>
The code:
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<script>
$(document).ready(function(){
var html = $('pre').html();
console.log(html);
});
</script>
</head>
<body>
<pre>
<ok:List Title="HelloWorld"></ok>
</pre>
</body>
</html>
I know that the XML standard is lowercase. However, in my situation, I cannot change this part of the xml. So I need a solution so that I can even make mistakes. Xml is displayed "incorrectly."
source
share