org.freehep.xml.util
Interface XMLTagWriter

All Known Implementing Classes:
XHTMLWriter, XMLWriter

public interface XMLTagWriter

XMLTagWriter Interface. Attributes need to be set before tags are written.

Version:
$Id: XMLTagWriter.java 8584 2006-08-10 23:06:37Z duns $
Author:
Mark Donszelmann

Method Summary
 void close()
          Close writer
 void closeDoc()
          Close XML doc
 void closeTag()
          Close nearest tag
 void openDoc()
          Open XML doc with standard parameters
 void openDoc(String version, String encoding, boolean standalone)
          Open XML doc
 void openTag(String name)
          Write an xml open tag
 void openTag(String ns, String name)
          Write an xml open tag
 void print(String text)
           
 void printComment(String comment)
           
 void printTag(String name)
          Write empty tag
 void printTag(String ns, String name)
          Write empty tag
 void referToDTD(String name, String system)
           
 void referToDTD(String name, String pid, String ref)
           
 void setAttribute(String name, boolean value)
          Set boolean attribute
 void setAttribute(String name, byte value)
          Set byte attribute
 void setAttribute(String name, char value)
          Set char attribute
 void setAttribute(String name, Color value)
          Set Color attribute
 void setAttribute(String name, double value)
          Set double attribute
 void setAttribute(String name, float value)
          Set float attribute
 void setAttribute(String name, int value)
          Set int attribute
 void setAttribute(String name, long value)
          Set long attribute
 void setAttribute(String name, short value)
          Set short attribute
 void setAttribute(String name, String value)
          Set String attribute
 void setAttribute(String ns, String name, boolean value)
          Set boolean attribute
 void setAttribute(String ns, String name, byte value)
          Set byte attribute
 void setAttribute(String ns, String name, char value)
          Set char attribute
 void setAttribute(String ns, String name, Color value)
          Set Color attribute
 void setAttribute(String ns, String name, double value)
          Set double attribute
 void setAttribute(String ns, String name, float value)
          Set float attribute
 void setAttribute(String ns, String name, int value)
          Set int attribute
 void setAttribute(String ns, String name, long value)
          Set long attribute
 void setAttribute(String ns, String name, short value)
          Set short attribute
 void setAttribute(String ns, String name, String value)
          Set String attribute
 

Method Detail

openTag

void openTag(String ns,
             String name)
             throws IOException
Write an xml open tag

Parameters:
ns - namespace
name - tagname
Throws:
IOException - if stream cannot be written

printTag

void printTag(String ns,
              String name)
              throws IOException
Write empty tag

Parameters:
ns - namespace
name - tagname
Throws:
IOException - if stream cannot be written

close

void close()
           throws IOException
Close writer

Throws:
IOException - if stream cannot be written

openDoc

void openDoc()
             throws IOException
Open XML doc with standard parameters

Throws:
IOException - if stream cannot be written

openDoc

void openDoc(String version,
             String encoding,
             boolean standalone)
             throws IOException
Open XML doc

Parameters:
version - version string
encoding - encoding
standalone - if XML is standalone
Throws:
IOException - if stream cannot be written

closeDoc

void closeDoc()
              throws IOException
Close XML doc

Throws:
IOException - if stream cannot be written

referToDTD

void referToDTD(String name,
                String system)

referToDTD

void referToDTD(String name,
                String pid,
                String ref)

openTag

void openTag(String name)
             throws IOException
Write an xml open tag

Parameters:
name - tagname
Throws:
IOException - if stream cannot be written

closeTag

void closeTag()
              throws IOException
Close nearest tag

Throws:
IOException - if stream cannot be written

printTag

void printTag(String name)
              throws IOException
Write empty tag

Parameters:
name - tagname
Throws:
IOException - if stream cannot be written

printComment

void printComment(String comment)
                  throws IOException
Throws:
IOException

print

void print(String text)
           throws IOException
Throws:
IOException

setAttribute

void setAttribute(String name,
                  String value)
Set String attribute

Parameters:
name - attribute name
value - attribute value

setAttribute

void setAttribute(String name,
                  Color value)
Set Color attribute

Parameters:
name - attribute name
value - attribute value

setAttribute

void setAttribute(String name,
                  byte value)
Set byte attribute

Parameters:
name - attribute name
value - attribute value

setAttribute

void setAttribute(String name,
                  char value)
Set char attribute

Parameters:
name - attribute name
value - attribute value

setAttribute

void setAttribute(String name,
                  long value)
Set long attribute

Parameters:
name - attribute name
value - attribute value

setAttribute

void setAttribute(String name,
                  int value)
Set int attribute

Parameters:
name - attribute name
value - attribute value

setAttribute

void setAttribute(String name,
                  short value)
Set short attribute

Parameters:
name - attribute name
value - attribute value

setAttribute

void setAttribute(String name,
                  boolean value)
Set boolean attribute

Parameters:
name - attribute name
value - attribute value

setAttribute

void setAttribute(String name,
                  float value)
Set float attribute

Parameters:
name - attribute name
value - attribute value

setAttribute

void setAttribute(String name,
                  double value)
Set double attribute

Parameters:
name - attribute name
value - attribute value

setAttribute

void setAttribute(String ns,
                  String name,
                  String value)
Set String attribute

Parameters:
ns - namespace
name - attribute name
value - attribute value

setAttribute

void setAttribute(String ns,
                  String name,
                  Color value)
Set Color attribute

Parameters:
ns - namespace
name - attribute name
value - attribute value

setAttribute

void setAttribute(String ns,
                  String name,
                  byte value)
Set byte attribute

Parameters:
ns - namespace
name - attribute name
value - attribute value

setAttribute

void setAttribute(String ns,
                  String name,
                  char value)
Set char attribute

Parameters:
ns - namespace
name - attribute name
value - attribute value

setAttribute

void setAttribute(String ns,
                  String name,
                  long value)
Set long attribute

Parameters:
ns - namespace
name - attribute name
value - attribute value

setAttribute

void setAttribute(String ns,
                  String name,
                  int value)
Set int attribute

Parameters:
ns - namespace
name - attribute name
value - attribute value

setAttribute

void setAttribute(String ns,
                  String name,
                  short value)
Set short attribute

Parameters:
ns - namespace
name - attribute name
value - attribute value

setAttribute

void setAttribute(String ns,
                  String name,
                  boolean value)
Set boolean attribute

Parameters:
ns - namespace
name - attribute name
value - attribute value

setAttribute

void setAttribute(String ns,
                  String name,
                  float value)
Set float attribute

Parameters:
ns - namespace
name - attribute name
value - attribute value

setAttribute

void setAttribute(String ns,
                  String name,
                  double value)
Set double attribute

Parameters:
ns - namespace
name - attribute name
value - attribute value


Copyright © 2000-2007 FreeHEP. All Rights Reserved.