Package org.devacfr.maven.skins.reflow
Class Xpp3Utils
- java.lang.Object
-
- org.devacfr.maven.skins.reflow.Xpp3Utils
-
public final class Xpp3Utils extends Object
Utility class to manipulateXpp3Dommodel.- Since:
- 2.0
- Author:
- Christophe Friederich
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<String>getChildren(org.codehaus.plexus.util.xml.Xpp3Dom parentNode)Gets the list of all children name for theparentNode.static List<org.codehaus.plexus.util.xml.Xpp3Dom>getChildrenNodes(org.codehaus.plexus.util.xml.Xpp3Dom parentNode, String name)Gets children list filtered by name ofparentNode.static org.codehaus.plexus.util.xml.Xpp3DomgetFirstChild(org.codehaus.plexus.util.xml.Xpp3Dom parentNode, String name, String namespace)Retrieves the child node.
-
-
-
Method Detail
-
getFirstChild
@Nullable public static org.codehaus.plexus.util.xml.Xpp3Dom getFirstChild(@Nullable org.codehaus.plexus.util.xml.Xpp3Dom parentNode, @Nonnull String name, @Nonnull String namespace)
Retrieves the child node. Tests both default name and with namespace.- Parameters:
parentNode- the parent nodename- the child name of node to getnamespace- the namespace (can be empty ornull).- Returns:
- Returns Returns
Xpp3Domrepresenting the child ofparentNodeif exists, otherwise returnsnull.
-
getChildren
@Nonnull public static List<String> getChildren(@Nullable org.codehaus.plexus.util.xml.Xpp3Dom parentNode)
Gets the list of all children name for theparentNode.- Parameters:
parentNode- the parent node to use (can benull.- Returns:
- Returns a list of
Stringrepresenting the name of all children, which may be empty but nevernull. - Since:
- 1.3
-
getChildrenNodes
@Nonnull public static List<org.codehaus.plexus.util.xml.Xpp3Dom> getChildrenNodes(@Nullable org.codehaus.plexus.util.xml.Xpp3Dom parentNode, String name)
Gets children list filtered by name ofparentNode.- Parameters:
parentNode- the parent node to use.name- the name of element to filter- Returns:
- Returns a list of
Xpp3Domrepresenting all children element filtered bynameofparentNode.
-
-