Hi,
I'm trying to save in a file my svg using the DOMUtilities.writeDocument but the
svg is full or partially troncated. what's wrong whith my svg ? have you got
another way to do this job ?
here is the piece of code to write in the file
Writer writer = null;
try {
writer = new PrintWriter(new
FileOutputStream("myXML.txt"));
} catch (FileNotFoundException e2) {
e2.printStackTrace();
}
try {
DOMUtilities.writeDocument(canvas.getUpdateManager().getDocument(),writer);
} catch (IOException e1) {
e1.printStackTrace();
}
the piece of my svg file is attached
--
Victor
<svg contentScriptType="text/ecmascript" width="800"
xmlns:xlink="http://www.w3.org/1999/xlink" zoomAndPan="magnify"
contentStyleType="text/css" height="600" preserveAspectRatio="xMidYMid meet"
xmlns="http://www.w3.org/2000/svg" version="1.0"><!-- BACKGROUND --><g
id="coachingGeneralPanel">
<rect x="0" width="800.0" y="0" height="600.0" style="stroke: rgb(0, 0,
0); fill: rgb(171, 191, 166);"/>
</g><g id="fieldPlayer">
<!-- Terrain -->
<rect x="200.0" width="600.0" y="80.0" height="490.0" style="stroke: rgb(0,
0, 0); fill: rgb(171, 191, 166);"/>
<!-- Lignes des 13 metres -->
<rect x="200.0" width="129.0" y="80.0" height="490.0" style="stroke: rgb(0,
0, 0); fill: rgb(171, 191, 166); stroke-dasharray: 2 5;"/>
<rect x="670.0" width="129.0" height="490.0" y="80.0" style="stroke: rgb(0,
0, 0); fill: rgb(171, 191, 166); stroke-dasharray: 2 5;"/>
<!-- Fin lignes des 13 metres -->
<!-- Surfaces de reparation -->
<rect x="200.0" width="80.0" y="210.0" height="230.0" style="stroke: rgb(0,
0, 0); fill: rgb(171, 191, 166);"/>
<rect x="719.0" width="80.0" y="210.0" height="238.0" style="stroke: rgb(0,
0, 0); fill: rgb(171, 191, 166);"/>
<!-- Fin surfaces de reparation -->
<!-- Buts -->
<rect x="200.0" width="10.0" height="106.0" y="267.0" style="stroke: rgb(0,
0, 0); fill: rgb(171, 191, 166);"/>
<rect x="789.0" width="10.0" y="265.0" height="106.0" style="stroke: rgb(0,
0, 0); fill: rgb(171, 191, 166);"/>
<!-- Fin buts -->
<!-- Ligne mediane -->
<line y2="570.0" x1="500.0" style="stroke: rgb(0, 0, 0); fill: none;"
x2="500.0" y1="80.0"/>
<!-- Fin ligne mediane -->
<!-- Rond point central -->
<ellipse rx="50.0" ry="50.0" style="stroke: rgb(0, 0, 0); fill: none;"
cx="500.0" cy="315.0"/>
<!-- Fin rond point central -->
<!-- Point d'engagement -->
<ellipse rx="3.0" ry="3.0" style="stroke: rgb(0, 0, 0); fill: rgb(0, 0,
0);" cx="500.0" cy="315.0"/>
<!-- Fin point d'engagement -->
<!-- fin terrain -->
</g><g id="topPanel">
<rect x="0" width="800" y="0" height="80" style="stroke: rgb(0, 0,
0); fill: rgb(255, 245, 235);"/>
<image x="2" y="2" width="227"
xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:href="../images/victor_logo.gif" xlink:type="simple"
xlink:actuate="onRequest" height="72" preserveAspectRatio="xMidYMid meet"
xlink:show="replace"/>
</g><g id="bottomPanel">
<rect width="800.0" y="570" height="30" style="stroke: rgb(0, 0,
0); fill: rgb(255, 245, 235);"/>
</g><g type="leftPanelRectangle">
<rect x="0.0" width="200" y="80" height="490" style="stroke: rgb(0,
0, 0); fill: none;">leftPanelRectangle</rect>
</g><g type="descriptionPanelContent">
<rect x="0.0" type="descriptionRectangleArea" y="80.0"
width="200.0" style="stroke: rgb(0, 0, 0); fill: rgb(213, 216,
219);" height="300.0">descriptionRectangleArea</rect>
<text x="6.0" y="116.0" type="descriptionTextArea">
<tspan x="6.0" dy="12.0">Mon texte de description</tspan>
</text>
</g><g type="descriptionPanelTitle">
<rect x="0.0" width="200.0" y="80.0" height="20.0"
style="stroke: rgb(0, 0, 0); fill: rgb(177, 194, 182);"/>
<text x="40.0" xml:space="preserve" y="95.0">Description de la
séance </text>
</g><g type="coachingPanelContent">
<rect x="0.0" type="coachingRectangleArea" y="380.0"
width="200.0" style="stroke: rgb(0, 0, 0); fill:
rgb(213, 216, 219);" height="190.0">coachingRectangleArea</rect>
<text x="6.0" y="416.0" type="coachingTextArea">
<tspan x="6.0" dy="12.0">Mon texte de coaching</tspan>
</text>
</g><g type="coachingPanelTitle">
<rect x="0.0" width="200.0" y="380.0" height="20.0"
style="stroke: rgb(0, 0, 0); fill: rgb(226, 195,
176);"/>
<text x="40.0" xml:space="preserve" y="395.0">Coaching de
la séance </text>
</g><!-- END OF BACKGROUND --><g selected="false" id="80"
type="Player_opposite"><ellipse fill="rgb(255,0,0)" rx="9" cx="378.0" ry="9"
cy="106.0" stroke="rgb(0,0,0)" stroke-width="1.0"/></g><g selected="false"
id="81" type="Player_opposite"><ellipse fill="rgb(255,0,0)" rx="9" cx="381.0"
ry="9" cy="184.0" stroke="rgb(0,0,0)" stroke-width="1.0"/></g><g
selected="false" id="82" type="Player_opposite"><ellipse fill="rgb(255,0,0)"
rx="9" cx="523.0" ry="9" cy="175.0" stroke="rgb(0,0,0)"
stroke-width="1.0"/></g><g selected="false" id="83"
type="Player_opposite"><ellipse fill="rgb(255,0,0)" rx="9" cx="582.0" ry="9"
cy="145.0" stroke="rgb(0,0,0)" stroke-width="1.0"/></g><g selected="false"
id="84" type="Player_opposite"><ellipse fill="rgb(255,0,0)" rx="9" cx="541.0"
ry="9" cy="241.0" stroke="rgb(0,0,0)" stroke-width="1.0"/></g><g
selected="false" id="85" type="Player_opposite"><ellipse fill="rgb(255,0,0)"
rx="9" cx="450.0" ry="9" cy="284.0" stroke="rgb(0,0,0)"
stroke-width="1.0"/></g><g selected="false" id="86"
type="Player_opposite"><ellipse fill="rgb(255,0,0)" rx="9" cx="400.0" ry="9"
cy="355.0" stroke="rgb(0,0,0)" stroke-width="1.0"/></g><g selected="false"
id="87" type="Player_opposite"><ellipse fill="rgb(255,0,0)" rx="9" cx="304.0"
ry="9" cy="299.0" stroke="rgb(0,0,0)" stroke-width="1.0"/></g><g
selected="false" id="88" type="Player_opposite"><ellipse fill="rgb(255,0,0)"
rx="9" cx="293.0" ry="9" cy="143.0" stroke="rgb(0,0,0)"
stroke-width="1.0"/></g><g selected="false" id="89"
type="Player_opposite"><ellipse fill="rgb(255,0,0)" rx="9" cx="571.0" ry="9"
cy="455.0" stroke="rgb(0,0,0)" stroke-width="1.0"/></g><g selected="false"
id="90" type="Player_opposite"><ellipse fill="rgb(255,0,0)" rx="9" cx="454.0"
ry="9" cy="476.0" stroke="rgb(0,0,0)" stroke-width="1.0"/></g><g
selected="false" id="91" type="Player_opposite"><ellipse fill="rgb(255,0,0)"
rx="9" cx="549.0" ry="9" cy="376.0" stroke="rgb(0,0,0)"
stroke-width="1.0"/></g><g selected="false" id="92"
type="Player_opposite"><ellipse fill="rgb(255,0,0)" rx="9" cx="597.0" ry="9"
cy="256.0" stroke="rgb(0,0,0)" stroke-width="1.0"/></g><g selected="false"
id="93" type="Player_opposite"><ellipse fill="rgb(255,0,0)" rx="9" cx="669.0"
ry="9" cy="115.0" stroke="rgb(0,0,0)" stroke-width="1.0"/></g><g
selected="false" id="94" type="Player_opposite"><ellipse fill="rgb(255,0,0)"
rx="9" cx="442.0" ry="9" cy="107.0" stroke="rgb(0,0,0)"
stroke-width="1.0"/></g><g selected="false" id="95"
type="Player_opposite"><ellipse fill="rgb(255,0,0)" rx="9" cx="414.0" ry="9"
cy="213.0" stroke="rgb(0,0,0)" stroke-width="1.0"/></g><g selected="false"
id="96" type="Player_opposite"><ellipse fill="rgb(255,0,0)" rx="9" cx="343.0"
ry="9" cy="250.0" stroke="rgb(0,0,0)" stroke-width="1.0"/></g><g
selected="false" id="97" type="Player_opposite"><ellipse fill="rgb(255,0,0)"
rx="9" cx="259.0" ry="9" cy="216.0" stroke="rgb(0,0,0)"
stroke-width="1.0"/></g><g selected="false" id="98"
type="Player_opposite"><ellipse fill="rgb(255,0,0)" rx="9" cx="251.0" ry="9"
cy="360.0" stroke="rgb(0,0,0)" stroke-width="1.0"/></g><g selected="false"
id="99" type="Player_opposite"><ellipse fill="rgb(255,0,0)" rx="9" cx="285.0"
ry="9" cy="432.0" stroke="rgb(0,0,0)" stroke-width="1.0"/></g><g
selected="false" id="100" type="Player_opposite"><ellipse fill="rgb(255,0,0)"
rx="9" cx="262.0" ry="9" cy="514.0" stroke="rgb(0,0,0)"
stroke-width="1.0"/></g><g selected="false" id="101"
type="Player_opposite"><ellipse fill="rgb(255,0,0)" rx="9" cx="391.0" ry="9"
cy="488.0" stroke="rgb(0,0,0)" stroke-width="1.0"/></g><g selected="false"
id="102" type="Player_opposite"><ellipse fill="rgb(255,0,0)" rx="9" cx="406.0"
ry="9" cy="423.0" stroke="rgb(0,0,0)" stroke-width="1.0"/></g><g
selected="false" id="103" type="Player_opposite"><ellipse fill="rgb(255,0,0)"
rx="9" cx="482.0" ry="9" cy="402.0" stroke="rgb(0,0,0)"
stroke-width="1.0"/></g><g selected="false" id="104"
type="Player_opposite"><ellipse fill="rgb(255,0,
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]