home *** CD-ROM | disk | FTP | other *** search
/ Dynamic HTML in Action / Dynamicke-HTML-v-akci-covermount.bin / XML / PARSER / XMLINST.EXE / classes / com / ms / xml / om / ElementFactory.java < prev    next >
Encoding:
Java Source  |  1997-11-05  |  1.3 KB  |  50 lines

  1. /*
  2.  * @(#)ElementFactory.java 1.0 6/3/97
  3.  * 
  4.  * Copyright (c) 1997 Microsoft, Corp. All Rights Reserved.
  5.  * 
  6.  */
  7.  
  8. package com.ms.xml.om;
  9.  
  10. import com.ms.xml.util.Name;
  11.  
  12. /**
  13.  * This interface specifies a method to create elements 
  14.  * for an XML element tree. This is used by the XML Document to create
  15.  * nodes in the tree as it parses the elements. 
  16.  * 
  17.  * @version     1.0, 10 Mar 1997
  18.  * @author      Istvan Cseri
  19.  */
  20. public interface ElementFactory
  21. {
  22.  
  23.     /**
  24.      * Creates an element with the specified tag for the
  25.      * specified type of element.
  26.      *
  27.      * @param   tag The name of the element.
  28.      * @param   type One of the predefined Element types that
  29.      * can be returned from <code>Element.getType</code>.
  30.      * @return  the created element.
  31.      * @see     Element
  32.      */
  33.     Element createElement(Element parent, int type, Name tag, String text);
  34.  
  35.     /**
  36.      * Notifies that the element is fully parsed.
  37.      *
  38.      * @param   elem  The element parsed.
  39.      * @see     Element
  40.      */
  41.     void parsed(Element elem);
  42.  
  43.     /**
  44.      * Notification that an attribute just got parsed.
  45.      * Value may be a String, Name or Vector of Names.
  46.      */
  47.     void parsedAttribute(Element e, Name name, Object value);
  48.  
  49. }    
  50.