com.bbn.swede.core.dom
Class XMLPrologParser

java.lang.Object
  extended bycom.bbn.swede.core.dom.XMLPrologParser

public class XMLPrologParser
extends Object

A parser to create nodes for a document's XML prolog. This includes the XML version line, DOCTYPE, and any additional processing instructions. The SAX parser that comes with Java handles these internally and only provides notifications to the user-defined handler for tags and attributes. This preprocessor allows prolog elements to be treated as part of the document's abstract syntax tree.

Author:
jlerner

Constructor Summary
XMLPrologParser()
          Creates an XMLPrologParser.
 
Method Summary
 OASTNode[] parse(String sProlog)
          Parses the prolog of an XML document into an array of XML processing instruction and DOCTYPE nodes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLPrologParser

public XMLPrologParser()
Creates an XMLPrologParser.

Method Detail

parse

public OASTNode[] parse(String sProlog)
Parses the prolog of an XML document into an array of XML processing instruction and DOCTYPE nodes.

Parameters:
sProlog - A string containing either a partial or full XML prolog. XML comments should be blanked out of the string before it is parsed.
Returns:
An array of OASTNodes retrieved from the supplied string. The nodes will be of type ProcessingInstruction or Doctype.


Copyright © 2004-2005 BBN Technologies. All Rights Reserved.