|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IDomParser
A wrapper for XML parser. This allows tools integrating lint to map directly to builtin services, such as already-parsed data structures in XML editors.
NOTE: This is not a public or final API; if you rely on this be prepared to adjust your code for the next tools release.
| Method Summary | |
|---|---|
void |
dispose(Context context)
Dispose any data structures held for the given context. |
Position |
getEndPosition(Context context,
Node node)
Returns the ending position of the given DOM node. |
Location |
getLocation(Context context,
Node node)
Returns a Location for the given DOM node |
Position |
getStartPosition(Context context,
Node node)
Returns the starting position of the given DOM node (which may not be just an element but can for example also be an Attr node). |
Document |
parse(Context context)
Parse the file pointed to by the given context and return as a Document |
| Method Detail |
|---|
Document parse(Context context)
context - the context pointing to the file to be parsed, typically
via Context.getContents() but the file handle (
Context.file can also be used to map to an existing
editor buffer in the surrounding tool, etc)
Position getStartPosition(Context context,
Node node)
Attr node). The
node will *always* be from the same DOM document that was returned by
this parser.
context - information about the file being parsednode - the node to look up a starting position for
Position getEndPosition(Context context,
Node node)
context - information about the file being parsednode - the node to look up a ending position for
Location getLocation(Context context,
Node node)
Location for the given DOM node
context - information about the file being parsednode - the node to create a location for
void dispose(Context context)
context - information about the file previously parsed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||