Class NamespaceReader
- java.lang.Object
-
- com.prowidesoftware.swift.model.mx.NamespaceReader
-
public class NamespaceReader extends java.lang.ObjectHelper API to extract information from an XML using lightweight XML streams API- Since:
- 9.2.1
-
-
Constructor Summary
Constructors Constructor Description NamespaceReader()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleanelementExists(java.lang.String xml, java.lang.String localName)Deprecated.useMxParseUtils.elementExists(String, String)insteadstatic java.util.Optional<java.lang.String>findAppHdrNamespace(java.lang.String xml)Extracts the header namespace from the XML, if the AppHdr element is presentstatic java.util.Optional<java.lang.String>findDocumentNamespace(java.lang.String xml)Extracts the document namespace from the XML, if the Document element is presentstatic java.util.Optional<java.lang.String>findNamespaceForLocalName(java.lang.String xml, java.lang.String localName)Extracts the namespace for a given element
-
-
-
Method Detail
-
findDocumentNamespace
public static java.util.Optional<java.lang.String> findDocumentNamespace(java.lang.String xml)
Extracts the document namespace from the XML, if the Document element is present- Parameters:
xml- the XML content- Returns:
- found namespace or empty if the Document is not found or does not contain a namespace
-
findAppHdrNamespace
public static java.util.Optional<java.lang.String> findAppHdrNamespace(java.lang.String xml)
Extracts the header namespace from the XML, if the AppHdr element is present- Parameters:
xml- the XML content- Returns:
- found namespace or empty if the AppHdr is not found or does not contain a namespace
-
findNamespaceForLocalName
public static java.util.Optional<java.lang.String> findNamespaceForLocalName(java.lang.String xml, java.lang.String localName)Extracts the namespace for a given element- Parameters:
xml- the XML contentlocalName- the element local name- Returns:
- found namespace or empty if the element is not found or does not contain a namespace
-
elementExists
@Deprecated @ProwideDeprecated(phase2=SRU2025) public static boolean elementExists(java.lang.String xml, java.lang.String localName)Deprecated.useMxParseUtils.elementExists(String, String)instead
-
-