public class XMLUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static Attr |
createAttribute(Document document,
Node node,
String name,
String value)
Create new attribute without namespace
|
static Attr |
createAttributeNS(Document document,
Node node,
String namespace,
String name,
String value)
Create new attribute with the namespace
|
static Node |
getAttributeByName(Element element,
String name)
Get attribute node by name from element
|
static Node |
getBaseRef(String recordType,
String separator)
Get root element for custom type
|
static List<Node> |
getChildByName(Element element,
String name)
All child nodes with a particular name are wrapped to the list
|
static String |
getEntity(String value)
Get entity from string.
|
static String |
getNamespace(String value)
Get namespace from string.
|
static List<Node> |
setReferenceToListValues(Node node,
Map<String,String> valueList)
Converting node to list node with references.Valuelist contains all references for particular list.
|
public static Node getBaseRef(String recordType, String separator)
recordType - Type of recordseparator - Separator for custom object or fieldspublic static List<Node> setReferenceToListValues(Node node, Map<String,String> valueList)
node - Root nodevalueList - List of values for particular list as map <internalId, value>public static Attr createAttribute(Document document, Node node, String name, String value)
document - Root documentnode - Node for new attributename - Name of attributevalue - Value of attributepublic static Attr createAttributeNS(Document document, Node node, String namespace, String name, String value)
document - Root documentnode - Node for new attributenamespace - Attribute namespacename - Name of attributevalue - Value of attributepublic static Node getAttributeByName(Element element, String name)
element - Node contains attributename - Name of attributepublic static List<Node> getChildByName(Element element, String name)
element - Root elementname - Name of childpublic static String getNamespace(String value)
value - Example: {urn:employees_2020_2.lists.webservices.netsuite.com}EmployeeCopyright © 2025 MuleSoft, Inc.. All rights reserved.