Join Joe Marini for an in-depth discussion in this video Creating document content, part of XML Essential Training.
- [Instructor] In the previous example, we saw how to use…the DOM API to discover and extract document content.…In this example, we're going to see how to use…the DOM to create new document content.…So let's open up DOMexample3_start.…So this script code should be a little familiar by now.…We're getting the element ID for the xml data…which, again, is down here in the document.…You can see right here.…And you get elements by tag name function…is getting the businessCard.…So, again, nothing new here so far.…So, we are going to fill out…this function called createBizCards.…
And this function gets called when the document loads.…Now one thing I want you to notice is that…in the xml section, I made a slight adjustment.…I have a new root tag named BusinessCards.…And the reason for that is because I want to have…more than one business card in the file.…So our code will start off with a loop that iterates…over all the elements of the bizCards array.…So let me do this, say.…
So then I'll have a local variable…that keeps track of the currentCard.…
- What is XML?
- Advantages and drawbacks of XML
- Proper XML syntax
- Working with XML namespaces
- Styling XML tags
- Discovering and creating document content
- Manipulating XML content using XPath and XSLT
- Document type definitions and XML schema
Skill Level Beginner
Learn API Documentation with JSON and XMLwith Peter Gruenbaum1h 18m Intermediate
1. Getting Started
2. XML Overview
3. Working with XML
4. Manipulating XML with the DOM
5. XML and XPath
6. XML and XSLT
7. XSLT Examples
8. Document Type Definitions
9. XML Schema
Next steps1m 4s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.