You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 57ed053
Browse filesBrowse the repository at this point in the historyBrowse files
**In the sample XML, the third book has several <author> elements. This statement replaces all of them with a single element, containing a new string:**
183
180
184
-
The result is this XML:
185
-
```xml
186
-
<bookcategory="CHILDREN">
187
-
<titlelang="en">Alice's Adventures in Wonderland</title>
188
-
<author>Charles 'Lewis Carroll' Dodgeson</author>
189
-
<year>1865</year>
190
-
<price>29.99</price>
191
-
</book>
192
-
```
193
-
- To replace just the first author, leaving all the other authors in place, use this statement:
194
-
```javascript
195
-
bookstoreXML.book[2].author[0] ="Charles Dodgeson, aka Lewis Carroll";
196
-
```
197
-
- This statement changes the content of the <year> element in the second book. ExtendScript automatically converts the numeric value to a string:
198
-
```javascript
199
-
bookstoreXML.book[1].year=1901;
200
-
```
201
-
- This following statement adds a new <rating> element to the second book:
0 commit comments