ca.infoway.messagebuilder.util.xml
Class XmlDescriber

Package class diagram package XmlDescriber
java.lang.Object
  extended by ca.infoway.messagebuilder.util.xml.XmlDescriber

public class XmlDescriber
extends Object

Some utilities for describing XML elements.

Author:
Intelliware Development

Constructor Summary
XmlDescriber()
           
 
Method Summary
static String describePath(Node node)
          A utility that creates an XPath-like path for a particular node.
static String describeSingleElement(Element element)
          A utility that creates a representation of the element and its attributes.
static int getIndexOf(Element start)
          A utility to determine which repetition of a particular element name this element represents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlDescriber

public XmlDescriber()
Method Detail

describePath

public static String describePath(Node node)

A utility that creates an XPath-like path for a particular node.

Parameters:
node - - the node being described.
Returns:
- the xpath location of the node.

getIndexOf

public static int getIndexOf(Element start)

A utility to determine which repetition of a particular element name this element represents. This method is used to create an xpath-like index for repeating elements.

Parameters:
start - - the element
Returns:
- the index.

describeSingleElement

public static String describeSingleElement(Element element)

A utility that creates a representation of the element and its attributes. This representation would typically be used in error messages to help the user recognize which element is a problem.

Parameters:
element - - the element
Returns:
- an XML-like repesentation of the element.


Copyright © 2013. All Rights Reserved.