Trim XML Namespace Prefix - CSharp System.Xml

CSharp examples for System.Xml:XML Namespace

Description

Trim XML Namespace Prefix

Demo Code

// Copyright (c) Microsoft. All rights reserved.
using System.Xml.Xsl;
using System.Xml.XPath;
using System.Xml;
using System.Text;
using System.Security.Policy;
using System.Reflection;
using System.IO;/*from w ww.j a  v  a  2  s.c o  m*/
using System.Globalization;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics;
using System.Collections;
using System;

public class Main{
        public static string TrimPrefix(string s)
        {
            int i = s.IndexOf(':');
            if (i < 0)
                return s;
            return s.Substring(i + 1);
        }
}

Related Tutorials