Class CatalogUtils
- java.lang.Object
-
- org.eclipse.lemminx.extensions.catalog.CatalogUtils
-
public class CatalogUtils extends Object
Utility functions for working with XML catalog documents
-
-
Constructor Summary
Constructors Constructor Description CatalogUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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
-
-
-
Method Detail
-
getCatalogEntries
public static 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.- Returns:
- a list of all the catalog entries in the given document, or an empty list if the document is not a catalog.
-
getCatalogEntryURI
public static DOMAttr getCatalogEntryURI(DOMElement element)
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
public static DOMAttr getCatalogEntryCatalog(DOMElement element)
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
public static String getResolvedLocation(DOMDocument document, CatalogEntry catalogEntry)
Returns the expanded system location- Parameters:
document- the xml documentcatalogEntry- the catalog entry- Returns:
- the expanded system location
-
-