Home > Articles

The Parser and DOM

This chapter is from the book

This chapter is from the book

Getting Started with DOM

Let's see, through examples, how to use a DOM parser. DOM is implemented in Web browsers so these examples run in a browser. At the time of this writing, Internet Explorer and Netscape have differences in how they implement DOM.

This is partly due to the fact that DOM level 2 does not specify how to load XML documents! Loading of documents is planned for DOM level 3 only. Therefore, to run these examples, make sure you use the correct browser, as indicated before the listing.

A DOM Application

Listing 7.2 is an HTML page for a JavaScript application to convert prices from U.S. dollars to euros. The price list is an XML document. The application demonstrates how to use DOM.

A slightly modified version of this page (essentially, better looking) could be used on an electronic shop. International shoppers could access product prices in their local currency.

CAUTION

By default, Internet Explorer supports a draft version of DOM, not the official recommendation.

Most differences are for namespace-related properties or functions. For example, DOM defines a property called localName but Internet Explorer implements baseName.

You can upgrade Internet Explorer to full standard conformance by downloading the latest Microsoft XML parser from msdn.microsoft.com/xml. If doing so, you would need to adapt the listings in this chapter.

Listing 7.2: conversion-ie5.html

<html>
<head>
<title>Currency Conversion</title>
<script language="JavaScript">
function convert(form,document)
{
 var output = form.output,
   rate = form.rate.value,
   root = document.documentElement;
 output.value = "";
 searchPrice(root,output,rate);
}

function searchPrice(node,output,rate)
{
 if(node.nodeType == 1)
 {
  // with DOM Level 2, it would be localName
  if(node.baseName == "product" &&
    node.namespaceURI== "http://www.psol.com/xbe2/listing7.1")
  {
    // with DOM Level 2, it would be getAttributeNS()
    var price = node.attributes.getQualifiedItem("price","");
    output.value += getText(node) + ": ";
    output.value += (price.value * rate) + "\r";
  }
  var children,
    i;
  children = node.childNodes;
  for(i = 0;i < children.length;i++)
    searchPrice(children.item(i),output,rate);
 }
}

function getText(node)
{
  var children = node.childNodes,
    text = "";
  for(i = 0;i < children.length;i++)
  {
   var n = children.item(i);
   if(n.nodeType == 3)
     text += n.data;
  }
  return text;
}
</script>
</head>
<body>
<center>
<form id="controls">
Rate: <input type="text" name="rate" value="1.0622" size="4"><br>
<input type="button" value="Convert"
    onclick="convert(controls,products)">
<input type="button" value="Clear" onclick="output.value=''"><br>
<!-- make sure there is one character in the text area -->
<textarea name="output" rows="10" cols="50" readonly> </textarea>
</form>
</center>
<xml id="products">
<xbe:products xmlns:xbe="http://www.psol.com/xbe2/listing7.1">
  <xbe:product price="499.00">XML Editor</xbe:product>
  <xbe:product price="199.00">DTD Editor</xbe:product>
  <xbe:product price="29.99">XML Book</xbe:product>
  <xbe:product price="699.00">XML Training</xbe:product>
</xbe:products>
</xml>
</body>
</html>

This page contains the XML document, the conversion routine in JavaScript, as well as an HTML form. Figure 7.6 shows the result in the browser.

Figure 7.6: Running the script in a browser.

The page defines a form with one field for the exchange rate (you can find the current exchange rate on any financial Web site):

Rate: <input type="text" name="rate" value="1.0622" size="4"><br>

It also defines a read-only text area that serves as output:

<textarea name="output" rows="10" cols="50" readonly> </textarea>

Finally, it defines an XML island. XML islands is a proprietary extension to HTML from Microsoft to insert XML documents within HTML documents. In this case, XML islands are used to access Internet Explorer's XML parser. The price list is loaded into the island:

<xml id="products">
<xbe:products xmlns:xbe="http://www.psol.com/xbe2/listing7.1">
  <xbe:product price="499.00">XML Editor</xbe:product>
  <xbe:product price="199.00">DTD Editor</xbe:product>
  <xbe:product price="29.99">XML Book</xbe:product>
  <xbe:product price="699.00">XML Training</xbe:product>
</xbe:products>
</xml>

NOTE

XML island is specific to Internet Explorer. It will not work with another browser. You will see why you have to use browser-specific code in a moment.

The "Convert" button in the HTML file calls the JavaScript function convert(), which is the conversion routine. convert() accepts two parameters—the form and the XML island:

<input type="button" value="Convert"
    onclick="convert(controls,products)">

The script retrieves the exchange rate from the form. It walks through the document (see the next section for the details). It communicates with the XML parser through the XML island.

DOM Node

Remember that DOM defines a set of objects that the parser uses to represent an XML document. Because XML documents are hierarchical, it stands to reason that DOM defines objects to build hierarchies or, as they are known to programmers, trees.

The core object in DOM is the Node. Nodes are generic objects in the tree and most DOM objects are derived from nodes. There are specialized versions of nodes for elements, attributes, entities, text, and so on.

Node defines several properties to help you walk through the tree. The following are the most important ones:

  • nodeType is a code representing the type of the object. The list of codes is shown in Table 7.1.

  • parentNode is the parent (if any) of current Node object.

  • childNodes is the list of children for the current Node object. childNodes is of type NodeList.

  • firstChild is the Node's first child.

  • lastChild is the Node's last child.

  • previousSibling is the Node immediately preceding the current one.

  • nextSibling is the Node immediately following the current one.

  • attributes is the list of attributes, if the current Node has any. The property is a NamedNodeMap.

  • In addition, Node defines four properties to manipulate the underlying object:

  • nodeName is the name of the Node (for an element, it's the tag name). The nodeName includes the namespace prefix, if any (for example, xbe:product).

  • localName/baseName is the local part of name—that is, the name without the namespace prefix such as product. The official DOM recommendation specifies localName but, by default, Internet Explorer uses baseName. You can upgrade Internet Explorer to full DOM support by downloading the latest parser from msdn.microsoft.com/xml.

  • namespaceURI is, as the name implies, the namespace's URI (for example, http://www.psol.com/xbe2/listing7.1).

  • prefix is the namespace prefix (for example, xbe).

  • nodeValue is the value of the Node (for a text node, it's the text).

» DOM also defines functions that will be introduced in Chapter 9, "Writing XML."

Table 7.1: nodeType Code

Type

Code

Element

1

Attribute

2

Text

3

CDATA section

4

Entity reference

5

Entity

6

Processing instruction

7

Comment

8

Document

9

Document type

10

Document fragment

11

Notation

12


In the example, the function searchPrice() tests whether the current node is an element:

if(node.nodeType == 1)
{
 // with DOM Level 2, it would be node.localName
 if(node.baseName == "product" &&
   node.namespaceURI== "http://www.psol.com/xbe2/listing7.1")
 {
   // with DOM Level 2, it would be node.getAttributeNodeNS()
   var price = node.attributes.getQualifiedItem("price","");
   output.value += getText(node) + ": ";
   output.value += (price.value * rate) + "\r";
 }
 var children,
   i;
 children = node.childNodes;
 for(i = 0;i < children.length;i++)
   searchPrice(children.item(i),output,rate);
}

NodeList

NodeList is a DOM object that contains a list of Node objects. It has only two properties:

  • length, the number of nodes in the list.

  • item(i), a method to access node i in the list.

NamedNodeMap

The searchPrice() function also accesses the price attribute. Element objects expose their attributes in the attributes property. The attributes property is a NamedNodeMap object.

A NamedNodeMap is a list of nodes with a name attached to them. It supports the same properties and methods as NodeListlength and item(i)—but, it also has special methods to access nodes by name:

  • getNamedItem()/getNamedItemNS()/getQualifiedItem()returns the node with the given name. getNamedItem() uses the element's tag, getNamedItemNS() uses its namespace URI and local name. getQualifiedItem() is the older form of getNamedItemNS(); it is not part of the official DOM standard, but it is the method required for Internet Explorer.

  • setNamedItem()/setNamedItemNS()sets the node with the given name. As seen previously, setNamedItemNS() uses the namespace.

  • removeNamedItem()/removeNamedItemNS()removes the node with the given name.

searchPrice() illustrates how to use attributes to retrieve the price attribute.

// with DOM Level 2, it would be node.getAttributeNodeNS()
var price = node.attributes.getQualifiedItem("price","");

CAUTION

Bear in mind that, by default, Internet Explorer 5.0 and 5.5 recognize an obsolete version of DOM. However, if you have upgraded them to the latest Microsoft parser, you will need to use the official DOM constructs.

Document Object

The topmost element in a DOM tree is Document. Document inherits from Node so it can be inserted in a tree. Document inherits most properties from Node and adds only three new properties:

  • documentElement is the root from the document.

  • implementation is a special object that defines methods that work without a document (such as createDocument(), which creates new documents).

  • doctype is the Document Type Definition.

Note that the Document object sits one step before the root element. Indeed the root element is in the documentElement property.

To return a tree, the parser returns a Document object. From the Document object, it is possible to access the complete document tree.

CAUTION

Unfortunately, the DOM recommendation starts with the Document object, not with the parser itself. DOM level 3 defines new methods to load and save XML documents but, for the time being, one must use proprietary solutions such as Microsoft's XML island.

Element Object

Element is the descendant of Node that is used specifically to represent XML elements. In addition to the properties inherited from Node, Element defines the tagName property for its tag name.

Obviously, since Element is a Node, it inherits the attributes property from Node. The property is a NamedNodeMap with a list of Attr elements.

Element also defines methods to extract information (there are more methods to create documents and they are introduced in Chapter 9, "Writing XML"):

  • getElementsByTagName()/getElementsByTagNamesNS() return a NodeList of all descendants of the element with a given tag name. The first method works with the element's tag, (xbe:product) whereas the second expects a namespace URI and local name (http://www.psol.com/xbe2/listing7.1 and product).

  • getAttributeNode() and getAttributeNodeNS() return an attribute from its tag or the combination of its namespace URI and local name, respectively.

Attr

Attr objects represent the attributes. Attr is a Node descendant. In addition to the properties it inherits from Node, Attr defines the following properties:

  • name is the name of the attribute.

  • value is the value of the attribute.

  • ownerElement is the Element this attribute is attached to.

  • specified is true if the attribute was given a value in the document; it is false if the attribute has taken a default value from the DTD.

TIP

The W3C decided to call the attribute object Attr to avoid confusion with object properties. In some languages, object properties are called object attributes. An Attribute object would have been very confusing.

Text Object

As the name implies, Text objects represent text such as the textual content of an element.

In the listing, the function uses getText() to return the textual content of a node. For safety, the function iterates over the element's children looking for Text objects:

function getText(node)
{
  var children = node.childNodes,
    text = "";
  for(i = 0;i < children.length;i++)
  {
   var n = children.item(i);
   if(n.nodeType == 3)
     text += n.data;
  }
  return text;
}

Why bother iterating over text elements or, if we brush that topic, why bother with Text objects at all? Why can't the parser attach the text directly to the element? The problem is with mixed content where an element contains both text and other elements. The following <p> element contains two text objects and one element object (<img>).

<p>The element can contain text and other elements such as images
<img src="logo.gif"/> or other.</p>

The <img> element object splits the text into two text objects:

  • The text before the <img> element, "The element can contain text and other elements such as images."

  • The text after, "or other."

Walking the Element Tree

To extract information or otherwise manipulate the document, the application walks the document tree. You have already seen this happening with the XSL processor.

Essentially, the script visits every element in the tree. This is easy with a recursive algorithm. To visit a node:

  • Do any node-specific processing, such as printing data.

  • Visit all its children.

Given that children are nodes, to visit them means visiting their children, and the children of their children, and so on.

The function searchPrice() illustrates this process. It visits each node by recursively calling itself for all children of the current node. This is a deep-first search—as you saw with the XSL processor. Figure 7.7 illustrates how it works.

function searchPrice(node,output,rate)
{
 if(node.nodeType == 1)
 {
  // with DOM Level 2, it would be localName
  if(node.baseName == "product" &&
    node.namespaceURI== "http://www.psol.com/xbe2/listing7.1")
  {
    // with DOM Level 2, it would be getAttributeNS()
    var price = node.attributes.getQualifiedItem("price","");
    output.value += getText(node) + ": ";
    output.value += (price.value * rate) + "\r";
  }
  var children,
    i;
  children = node.childNodes;
  for(i = 0;i < children.length;i++)
    searchPrice(children.item(i),output,rate);
 }
}
Figure 7.7: Walking down the tree.

There is a major simplification in searchPrice(): The function only examines nodes of type element (node.nodeType == 1). This is logical given that the function is looking for product elements, so there is no point in examining other types of nodes such as text or entities. As you will see, more complex applications have to examine all the nodes.

At each step, the function tests whether the current node is a product. For each product element, it extracts the price attribute, computes the price in euros, and prints it.

NOTE

For the first time, in this listing, you're seeing how an application processes namespaces. It's not difficult, the application simply compares an element namespace with a predefined value.

In effect, the application tests the element name by comparing both its local name and its namespace:

if(node.baseName == "product" &&
  node.namespaceURI=="http://www.psol.com/xbe2/listing7.1")

Next, the function turns to the node's children. It loops through all the children and recursively calls itself for each child.

To walk through the node's children, the function accesses the childNodes property. childNodes contains a NodeList.

To get started, we just call searchPrice() passing it the root of the XML document, the exchange rate, and text area where it can write the result. The root is accessible through the documentElement property:

var output = form.output,
  rate = form.rate.value,
  root = document.documentElement;
output.value = "";
searchPrice(root,output,rate);

A More Standard Version

Internet Explorer is close to the DOM standard but not exactly there yet (unless you upgrade to the latest version of the parser or download from msdn.microsoft.com/xml).

As a comparison, we'll build a similar application in Netscape 6 which has more solid support for DOM. Netscape takes a different approach to supporting XML documents. Instead of using proprietary XML island, Netscape loads the XML document directly. To build the user interface, insert HTML elements (or, to be more precise, XHTML elements—HTML elements written with the XML syntax).

This approach has some advantages; most notably it frees us from using proprietary XML island because the whole document is an XML document. On the downside, it makes it difficult to load new XML documents. Furthermore, a bug prevents us from using text input fields. The application would look like Listings 7.3 and 7.4.

Listing 7.3: conversion-ns6.xml

<?xml version="1.0"?>
<?xml-stylesheet href="common.css" type="text/css"?>
<conversion xmlns:html="http://www.w3.org/1999/xhtml">
<html:script language="JavaScript"><![CDATA[
function convert()
{
 var rate = 1.06224,
   root = document.documentElement,
   products = root.getElementsByTagNameNS(
        "http://www.psol.com/xbe2/listing7.1","products"),
   outputs = root.getElementsByTagNameNS(
              "http://www.w3.org/1999/xhtml","pre");
 if(outputs.length < 1 || products.length < 1)
  return;
 var output = outputs.item(0).firstChild;
 output.data = "";
 searchPrice(products.item(0),output,rate);
}

function searchPrice(node,output,rate)
{
 if(node.nodeType == 1)
 {
  if(node.localName == "product" &&
    node.namespaceURI== "http://www.psol.com/xbe2/listing7.1")
  {
    for(j = 0;j < node.attributes.length;j++)
    var price = node.getAttributeNodeNS("","price").value;
    output.data += getText(node) + ": ";
    output.data += (price * rate) + "\n";
  }
  var children,
    i;
  children = node.childNodes;
  for(i = 0;i < children.length;i++)
    searchPrice(children.item(i),output,rate);
 }
}

function getText(node)
{
  var children = node.childNodes,
    text = "";
  for(i = 0;i < children.length;i++)
  {
   var n = children.item(i);
   if(n.nodeType == 3)
     text += n.data;
  }
  return text;
}
]]></html:script>
<html:center>
<!-- make sure there is one character in the text area -->
<html:pre> </html:pre>
<html:form id="controls">
<html:input type="button" value="Convert" onclick="convert()"/>
</html:form>
</html:center>
<xbe:products xmlns:xbe="http://www.psol.com/xbe2/listing7.1">
  <xbe:product price="499.00">XML Editor</xbe:product>
  <xbe:product price="199.00">DTD Editor</xbe:product>
  <xbe:product price="29.99">XML Book</xbe:product>
  <xbe:product price="699.00">XML Training</xbe:product>
</xbe:products>
</conversion>

Listing 7.4: common.css

product
{
  display: block;
  text-align: center;
}

Figure 7.8 illustrates the result in a browser.

Figure 7.8: Price conversions in Netscape 6.

The document's root could be any element because it is not used anywhere else. It declares the xhtml namespace. The document also uses a CSS (from Listing 7.4):

<?xml-stylesheet href="common.css" type="text/css"?>
<conversion xmlns:html="http://www.w3.org/1999/xhtml">

Where needed, we can insert XHTML element for the script (html:script) or for a simple HTML form:

<html:center>
<!-- make sure there is one character in the text area -->
<html:pre> </html:pre>
<html:form id="controls">
<html:input type="button" value="Convert" onclick="convert()"/>
</html:form>
</html:center>

The XML price list is inserted directly in the XML document. It is recognizable through its own namespace:

<xbe:products xmlns:xbe="http://www.psol.com/xbe2/listing7.1">
  <xbe:product price="499.00">XML Editor</xbe:product>
  <xbe:product price="199.00">DTD Editor</xbe:product>
  <xbe:product price="29.99">XML Book</xbe:product>
  <xbe:product price="699.00">XML Training</xbe:product>
</xbe:products>

Unfortunately, a bug prevents us from using text input fields or text area in XHTML. The exchange rate must be stored as a variable in the script; to update the exchange rate, you need to update the script. A similar problem with text areas means that the script must write its output in a pre-element.

Because the entire document is an XML document, documentElement points to the conversion root. The script uses getElementsByTagNameNS() to retrieve the product list. Notice how the namespace helps pinpoint the right elements. The remainder of the script should be familiar because it calls searchPrice():

var rate = 1.06224,
  root = document.documentElement,
  products = root.getElementsByTagNameNS(
       "http://www.psol.com/xbe2/listing7.1","products"),
  outputs = root.getElementsByTagNameNS(
             "http://www.w3.org/1999/xhtml","pre");
if(outputs.length < 1 || products.length < 1)
 return;
var output = outputs.item(0).firstChild;
output.data = "";
searchPrice(products.item(0),output,rate);

searchPrice() is nearly identical to Listing 7.2, except that it uses the standard DOM methods such as

if(node.localName == "product" &&
  node.namespaceURI== "http://www.psol.com/xbe2/listing7.1")

or

var price = node.getAttributeNodeNS("","price").value;

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020