spacer
Yehuda Shiran February 3, 2002
Node Types You Can Add to the XML Tree
Tips: February 2002

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
Eclipse Helios Update Brings New PHP Tools
Internet Explorer 9 Ups Standards Support
JBoss Portal 5 Release Easier to Use

There are twelve node types in the DOMDocument tree. You can add new nodes to the tree with the createNode() method, a member of the DOMDocument object. The first parameter of createNode() is the node type. Out of the 12 node types, you can create nodes for only eight:

  • 1. "element"
  • 2. "attribute"
  • 3. "text"
  • 4. "cdatasection"
  • 5. "entityreference"
  • 7. "processinginstruction"
  • 8. "comment"
  • 11. "documentfragment"

There are four node types you cannot create:

  • 6. "entity"
  • 9. "document"
  • 10. "documenttype"
  • 12. "notation"

People who read this tip also read these tips:

Look for similar tips by subject:

webref The latest from WebReference.com Browse >
Flashmaps' DynamicLocator: Interactive Maps for Small Areas · Flashmaps' AreaSelector: Interactive Maps for Wide Areas · The DB Mapper: Interactive Street-level Maps of U.S. and Canada
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
MS Access and MySQL · Cisco AutoQoS: VoIP QoS for Mere Mortals · While VoIP Adoption Explodes in Enterprise, Carrier Spending Lags