Represents an XML name consisting of a local (unqualified) name for an element or attribute and the URI of the namespace for that element or attribute.
Type Details
- yfiles module
- core
- yfiles-umd modules
- All modules
- Legacy UMD name
- yfiles.graphml.XmlName
Constructors
Initializes a new instance of the XmlName class.
Parameters
A map of options to pass to the method.
- localName - string
- The local name of the element.
- ns - string
- The namespace it belongs to.
Methods
Returns a hash code for this object.
Remarks
The hash code is a numeric value that can be used to treat this object as a key in a hash table or similar data structure.
Two objects that are considered equal must have the same hash code. However, the reverse does not hold and two objects having the same hash code don't have to be equal. Ideally, the hash code should be roughly uniformly-distributed to prevent hash tables from performing poorly. Calculating the hash code is also a potentially frequent operation and should therefore be fast.
Returns
- ↪number
- the hash code for this object
Static Methods
Performs a conversion from string to XmlName.
Remarks
"http://www.w3.org/2000/xmlns/}local"
it will be split at the "}" character and the first part will be used as the namespace URI, the second part as the local name. If no "}" character is used in the input then it will be assumed that the input consists of the local name only.Parameters
A map of options to pass to the method.
- expandedName - string
- Name of the expanded.
Returns
- ↪XmlName
- The result of the conversion.