NetKernel APIs


org.ten60.netkernel.xml.xda
Interface IXDA

All Superinterfaces:
IXDAReadOnly
All Known Subinterfaces:
IXDAIterator
All Known Implementing Classes:
DOMXDA

public interface IXDA
extends IXDAReadOnly

Xpath Document API


Method Summary
 void append(IXDAReadOnly aSource, String aSourceXPath, String aTargetXPath)
          Append fragment of source to this at a specified location or locations
 void appendPath(String aTargetXPath, String aNewRelativeXPath, String aOptionalValue)
          Builds and appends a chain of elements to a location or locations within this
 void applyNS(String aTargetXPath, String prefix, String uri)
          Apply namespace to target location or locations
 void delete(String aTargetXPath)
          Delete elements at target location or locations
 void insertAfter(IXDAReadOnly aSource, String aSourceXPath, String aTargetXPath)
          Insert fragment of source to this after specified location or locations
 void insertBefore(IXDAReadOnly aSource, String aSourceXPath, String aTargetXPath)
          Insert fragment of source to this before specified location or locations
 IXDAIterator iterator(String aTargetXPath)
          Return an iterator over all elements match the xpath in this
 void move(String aSourceXPath, String aTargetXPath)
          Moves a fragment from one location in this to another
 void removeNS(String aTargetXPath, String prefix)
          Remove namespace from target location or locations
 void rename(String aTargetXPath, String name)
          Rename elements at target location or locations
 void replace(IXDAReadOnly aSource, String aSourceXPath, String aTargetXPath)
          Replace fragments of this with fragments from source at specified location or locations
 void replaceByText(String aTargetXPath, String aText)
          Replace fragments of this with given text at specified location or locations
 void setText(String aTargetXPath, String aText)
          Sets the text of the element or elements at the target location of this
 
Methods inherited from interface org.ten60.netkernel.xml.xda.IXDAReadOnly
eval, getText, isTrue, readOnlyIterator, serialize, serialize
 

Method Detail

append

public void append(IXDAReadOnly aSource,
                   String aSourceXPath,
                   String aTargetXPath)
            throws XPathLocationException,
                   XDOIncompatibilityException
Append fragment of source to this at a specified location or locations

Throws:
XPathLocationException - throw if the xpath is malformed, xpaths don't result in well defined element
XDOIncompatibilityException - throw if the implementation doesn't support this operation

insertBefore

public void insertBefore(IXDAReadOnly aSource,
                         String aSourceXPath,
                         String aTargetXPath)
                  throws XPathLocationException,
                         XDOIncompatibilityException
Insert fragment of source to this before specified location or locations

Throws:
XPathLocationException - throw if the xpath is malformed, xpaths don't result in well defined element
XDOIncompatibilityException - throw if the implementation doesn't support this operation

insertAfter

public void insertAfter(IXDAReadOnly aSource,
                        String aSourceXPath,
                        String aTargetXPath)
                 throws XPathLocationException,
                        XDOIncompatibilityException
Insert fragment of source to this after specified location or locations

Throws:
XPathLocationException - throw if the xpath is malformed, xpaths don't result in well defined element
XDOIncompatibilityException - throw if the implementation doesn't support this operation

applyNS

public void applyNS(String aTargetXPath,
                    String prefix,
                    String uri)
             throws XPathLocationException,
                    XDOIncompatibilityException
Apply namespace to target location or locations

Parameters:
prefix - prefix for the namespace
uri - uri for the namespace
Throws:
XPathLocationException - throw if the xpath is malformed, xpaths don't result in well defined element
XDOIncompatibilityException - throw if the implementation doesn't support this operation

removeNS

public void removeNS(String aTargetXPath,
                     String prefix)
              throws XPathLocationException,
                     XDOIncompatibilityException
Remove namespace from target location or locations

Parameters:
prefix - prefix for the namespace
Throws:
XPathLocationException - throw if the xpath is malformed, xpaths don't result in well defined element
XDOIncompatibilityException - throw if the implementation doesn't support this operation

rename

public void rename(String aTargetXPath,
                   String name)
            throws XPathLocationException,
                   XDOIncompatibilityException
Rename elements at target location or locations

Parameters:
name - the new element name
Throws:
XPathLocationException - throw if the xpath is malformed, xpaths don't result in well defined element
XDOIncompatibilityException - throw if the implementation doesn't support this operation

delete

public void delete(String aTargetXPath)
            throws XPathLocationException,
                   XDOIncompatibilityException
Delete elements at target location or locations

Throws:
XPathLocationException - throw if the xpath is malformed, xpaths don't result in well defined element
XDOIncompatibilityException - throw if the implementation doesn't support this operation

replace

public void replace(IXDAReadOnly aSource,
                    String aSourceXPath,
                    String aTargetXPath)
             throws XPathLocationException,
                    XDOIncompatibilityException
Replace fragments of this with fragments from source at specified location or locations

Throws:
XPathLocationException - throw if the xpath is malformed, xpaths don't result in well defined element
XDOIncompatibilityException - throw if the implementation doesn't support this operation

replaceByText

public void replaceByText(String aTargetXPath,
                          String aText)
                   throws XPathLocationException,
                          XDOIncompatibilityException
Replace fragments of this with given text at specified location or locations

Parameters:
aText - the text to place at locations
Throws:
XPathLocationException - throw if the xpath is malformed, xpaths don't result in well defined element
XDOIncompatibilityException - throw if the implementation doesn't support this operation

move

public void move(String aSourceXPath,
                 String aTargetXPath)
          throws XPathLocationException,
                 XDOIncompatibilityException
Moves a fragment from one location in this to another

Throws:
XPathLocationException - throw if the xpath is malformed, xpaths don't result in well defined element
XDOIncompatibilityException - throw if the implementation doesn't support this operation

setText

public void setText(String aTargetXPath,
                    String aText)
             throws XPathLocationException,
                    XDOIncompatibilityException
Sets the text of the element or elements at the target location of this

Throws:
XPathLocationException - throw if the xpath is malformed, xpaths don't result in well defined element
XDOIncompatibilityException - throw if the implementation doesn't support this operation

appendPath

public void appendPath(String aTargetXPath,
                       String aNewRelativeXPath,
                       String aOptionalValue)
                throws XPathLocationException,
                       XDOIncompatibilityException
Builds and appends a chain of elements to a location or locations within this

Parameters:
aNewRelativeXPath - a simple xpath of form a/b/c to name a chain of elements to append.
aOptionalValue - a text value to assign to the leaf node, may be null
Throws:
XPathLocationException - throw if the xpath is malformed, xpaths don't result in well defined element
XDOIncompatibilityException - throw if the implementation doesn't support this operation

iterator

public IXDAIterator iterator(String aTargetXPath)
                      throws XPathLocationException
Return an iterator over all elements match the xpath in this

Throws:
XPathLocationException - throw if the xpath is malformed, xpaths don't result in well defined element

NetKernel APIs


Copyright © 2002-2004 1060 Research Ltd. All Rights Reserved.