Skip to content

Commit 217aad9

Browse files
committed
Fix and beautify XML syntax in exercise 18-14
1 parent 4bd850c commit 217aad9

1 file changed

Lines changed: 21 additions & 22 deletions

File tree

chp18_data/exercise_18_14_particles_xml/exercise_18_14_particles_xml.pde

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,39 @@
22
// Daniel Shiffman
33
// http://www.learningprocessing.com
44

5-
// lass="exercise"data-type="sidebar"id="use_the_following_xml_document_to_initia">
6-
// Exercise 18-14: Use the following XML document to initialize an array of
7-
// objects. Design the objects to use all of the values in each XML element.
8-
// (Feel free to rewrite the XML document to include more or less data.)
9-
// If you do not want to retype the XML, it is available at this book's web
5+
// Exercise 18-14: Use the following XML document to initialize an array of
6+
// objects. Design the objects to use all of the values in each XML element.
7+
// (Feel free to rewrite the XML document to include more or less data.)
8+
// If you do not want to retype the XML, it is available at this book's web
109
// site.
1110

1211
/*
13-
<?xml version ="1.0"?>
12+
<?xml version="1.0"?>
1413
<particles>
1514
<particle>
16-
<location x ="99"y ="192"/>
17-
<speed x ="&ndash; 0.88238335"y ="2.2704291"/>
18-
<size w ="38"h ="10"/>
15+
<location x="99" y="192"/>
16+
<speed x="0.88238335" y="2.2704291"/>
17+
<size w="38" h="10"/>
1918
</particle>
2019
<particle>
21-
<location x ="97"y ="14"/>
22-
<speed x ="2.8775783"y ="2.9483867"/>
23-
<size w ="81"h ="43"/>
20+
<location x="97" y="14"/>
21+
<speed x="2.8775783" y="2.9483867"/>
22+
<size w="81" h="43"/>
2423
</particle>
2524
<particle>
26-
<location x ="159"y ="193"/>
27-
<speed x ="-1.2341062"y ="0.44016743"/>
28-
<size w ="19"h ="95"/>
25+
<location x="159" y="193"/>
26+
<speed x="-1.2341062" y="0.44016743"/>
27+
<size w="19" h="95"/>
2928
</particle>
3029
<particle>
31-
<location x ="102"y ="53"/>
32-
<speed x ="0.8000488"y ="-2.2791147"/>
33-
<size w ="25"h ="95"/>
30+
<location x="102" y="53"/>
31+
<speed x="0.8000488" y="-2.2791147"/>
32+
<size w="25" h="95"/>
3433
</particle>
3534
<particle>
36-
<location x ="152"y ="181"/>
37-
<speed x ="1.9928784"y ="-2.9540048"/>
38-
<size w ="74"h ="19"/>
35+
<location x="152" y="181"/>
36+
<speed x="1.9928784" y="-2.9540048"/>
37+
<size w="74" h="19"/>
3938
</particle>
40-
</particles>
39+
</particles>
4140
*/

0 commit comments

Comments
 (0)