DeleteNode() static private method

Deletes the the given node and its children from its parent. Takes care about adjusting the flags.
static private DeleteNode ( XmpNode node ) : void
node XmpNode the top-most node to delete.
return void
Example #1
0
        /// <seealso cref= XMPMeta#deleteProperty(String, String) </seealso>
        public virtual void DeleteProperty(string schemaNs, string propName)
        {
            try {
                ParameterAsserts.AssertSchemaNs(schemaNs);
                ParameterAsserts.AssertPropName(propName);

                XmpPath expPath = XmpPathParser.ExpandXPath(schemaNs, propName);

                XmpNode propNode = XmpNodeUtils.FindNode(_tree, expPath, false, null);
                if (propNode != null)
                {
                    XmpNodeUtils.DeleteNode(propNode);
                }
            }
            catch (XmpException) {
                // EMPTY, exceptions are ignored within delete
            }
        }