com.anet.api.util
Class BasicXmlDocument

java.lang.Object
  extended by com.anet.api.util.BasicXmlDocument

public class BasicXmlDocument
extends java.lang.Object

Utility Class representing an XML document


Nested Class Summary
(package private)  class BasicXmlDocument.BasicXmlDocumentEntityResolver
           
(package private)  class BasicXmlDocument.BasicXMLDocumentErrorHandler
           
 
Field Summary
private  boolean accessible
           
private  javax.xml.parsers.DocumentBuilder db
           
private  javax.xml.parsers.DocumentBuilderFactory dbf
           
private  org.w3c.dom.Document document
           
protected static org.apache.commons.logging.Log log
          the log
private  java.lang.String resolvePath
           
 
Constructor Summary
BasicXmlDocument()
           
 
Method Summary
 org.w3c.dom.Element createElement(java.lang.String name)
           
 java.lang.String dump()
           
 java.lang.String dump(boolean collapse)
           
 org.w3c.dom.Document getDocument()
           
 org.w3c.dom.Element getDocumentElement()
           
private  void initClass()
           
 boolean IsAccessible()
           
 boolean parse(java.io.InputStream in)
           
 boolean parseBytes(byte[] xmlBytes)
           
 boolean parseString(java.lang.String xmlValue)
           
 boolean removeChildren(org.w3c.dom.Node ref)
           
 void setResolvePath(java.lang.String p)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log
the log


document

private org.w3c.dom.Document document

accessible

private boolean accessible

dbf

private javax.xml.parsers.DocumentBuilderFactory dbf

db

private javax.xml.parsers.DocumentBuilder db

resolvePath

private java.lang.String resolvePath
Constructor Detail

BasicXmlDocument

public BasicXmlDocument()
                 throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

initClass

private void initClass()
                throws java.lang.Exception
Throws:
java.lang.Exception

setResolvePath

public void setResolvePath(java.lang.String p)
Parameters:
p -

IsAccessible

public boolean IsAccessible()
Returns:
accessible

getDocument

public org.w3c.dom.Document getDocument()
Returns:
document

getDocumentElement

public org.w3c.dom.Element getDocumentElement()
Returns:
document.getDocumentElement()

createElement

public org.w3c.dom.Element createElement(java.lang.String name)
Parameters:
name -
Returns:
document.createElement(name)

removeChildren

public boolean removeChildren(org.w3c.dom.Node ref)
Parameters:
ref -
Returns:
ret

parse

public boolean parse(java.io.InputStream in)
              throws java.lang.Exception
Parameters:
in -
Returns:
boolean
Throws:
java.lang.Exception

parseString

public boolean parseString(java.lang.String xmlValue)
                    throws java.lang.Exception
Parameters:
xmlValue -
Returns:
boolean
Throws:
java.lang.Exception

parseBytes

public boolean parseBytes(byte[] xmlBytes)
                   throws java.lang.Exception
Parameters:
xmlBytes -
Returns:
boolean
Throws:
java.lang.Exception

dump

public java.lang.String dump()
Returns:
String

dump

public java.lang.String dump(boolean collapse)
Parameters:
collapse -
Returns:
String


Copyright © 2011 DS Data Systems UK Ltd.