Bonjour,

si j'ai des fichiers SVG commen�ant comme ceci :
Code html : S�lectionner tout - Visualiser dans une fen�tre � part
1
2
3
4
5
6
7
8
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
 
<!-- Généré par Microsoft Visio 11.0, SVG Export, v1.0 A_GLO_AFfr.svg Page-1 -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events"
		xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="11.6929in" height="8.26772in"
		viewBox="0 0 841.89 595.276" xml:space="preserve" color-interpolation-filters="sRGB" class="st24">
<!-- ... -->

Est il possible de modifier ma premi�re ligne
Code html : S�lectionner tout - Visualiser dans une fen�tre � part
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
pour qu'elle devienne :
Code html : S�lectionner tout - Visualiser dans une fen�tre � part
<?xml-stylesheet version="1.0" encoding="UTF-8" standalone="no" type="text/css" href="../../style/css/customSVG.css"?>
ou alors d'ins�rer cette nouvelle ligne apr�s la premi�re ?

J'affiche et j'acc�de � mon SVG via un <object> dans ma page html.
Code javascript : S�lectionner tout - Visualiser dans une fen�tre � part
1
2
document.querySelector("#svgElement").contentDocument.firstChild
document.querySelector("#svgElement").contentDocument.documentElement
Sont respectivelment les balises <!DOCTYPE> et <svg>