iTextSharp.xmp.XmpPathFactory.ComposeStructFieldPath C# (CSharp) Method

ComposeStructFieldPath() public static method

Compose the path expression for a field in a struct. The result can be added to the path of
Thrown if the path to create is not valid.
public static ComposeStructFieldPath ( string fieldNs, string fieldName ) : string
fieldNs string The namespace URI for the field. Must not be null or the empty /// string.
fieldName string The name of the field. Must be a simple XML name, must not be /// null or the empty string.
return string
        public static string ComposeStructFieldPath(string fieldNs, string fieldName) {
            AssertFieldNs(fieldNs);
            AssertFieldName(fieldName);

            XmpPath fieldPath = XmpPathParser.ExpandXPath(fieldNs, fieldName);
            if (fieldPath.Size() != 2) {
                throw new XmpException("The field name must be simple", XmpError.BADXPATH);
            }

            return '/' + fieldPath.GetSegment((int) XmpPath.STEP_ROOT_PROP).Name;
        }