diff --git a/resourcespoet/src/main/java/com/commit451/resourcespoet/ResourcesPoet.java b/resourcespoet/src/main/java/com/commit451/resourcespoet/ResourcesPoet.java index b70b3aa..c9108da 100644 --- a/resourcespoet/src/main/java/com/commit451/resourcespoet/ResourcesPoet.java +++ b/resourcespoet/src/main/java/com/commit451/resourcespoet/ResourcesPoet.java @@ -447,6 +447,26 @@ public ResourcesPoet remove(@NotNull Type type, @NotNull String name) { return this; } + /** + * Get the value of the current resource of this type and name + * @param type the type + * @param name the name + * @return the value or null if it does not exist + */ + @Nullable + public String value(@NotNull Type type, @NotNull String name) { + NodeList nodeList = resourceElement.getElementsByTagName(type.toString()); + for (int i=0; i