Class CatalogUtils
java.lang.Object
org.eclipse.lemminx.extensions.catalog.CatalogUtils
Utility functions for working with XML catalog documents
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<CatalogEntry>getCatalogEntries(DOMDocument document) Returns a list of all the catalog entries in the given document, or an empty list if the document is not a catalog.static DOMAttrgetCatalogEntryCatalog(DOMElement element) Returns the catalog attribute node of the given catalog entry or null if there is no catalog attributestatic DOMAttrgetCatalogEntryURI(DOMElement element) Returns the uri attribute node of the given catalog entry or null if there is no uri attributestatic StringgetResolvedLocation(DOMDocument document, CatalogEntry catalogEntry) Returns the expanded system location
-
Constructor Details
-
CatalogUtils
public CatalogUtils()
-
-
Method Details
-
getCatalogEntries
Returns a list of all the catalog entries in the given document, or an empty list if the document is not a catalog.- Returns:
- a list of all the catalog entries in the given document, or an empty list if the document is not a catalog.
-
getCatalogEntryURI
Returns the uri attribute node of the given catalog entry or null if there is no uri attribute- Parameters:
element- The catalog entry to get the uri attribute of- Returns:
- the uri attribute node of the given catalog entry or null if there is no uri attribute
-
getCatalogEntryCatalog
Returns the catalog attribute node of the given catalog entry or null if there is no catalog attribute- Parameters:
element- The catalog entry to get the catalog attribute of- Returns:
- the catalog attribute node of the given catalog entry or null if there is no catalog attribute
-
getResolvedLocation
Returns the expanded system location- Parameters:
document- the xml documentcatalogEntry- the catalog entry- Returns:
- the expanded system location
-