当前位置: 首页>>代码示例>>C#>>正文


C# Xml.XmlNameTable类代码示例

本文整理汇总了C#中System.Xml.XmlNameTable的典型用法代码示例。如果您正苦于以下问题:C# XmlNameTable类的具体用法?C# XmlNameTable怎么用?C# XmlNameTable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


XmlNameTable类属于System.Xml命名空间,在下文中一共展示了XmlNameTable类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: XmlParserContext

 /// <include file='doc\XmlParserContext.uex' path='docs/doc[@for="XmlParserContext.XmlParserContext3"]/*' />
 public XmlParserContext(XmlNameTable nt, XmlNamespaceManager nsMgr, String docTypeName,
                   String pubId, String sysId, String internalSubset, String baseURI,
                   String xmlLang, XmlSpace xmlSpace, Encoding enc)
 {
     
     if (nsMgr != null) {
         if (nt == null) {
             _nt = nsMgr.NameTable;
         }
         else {
             if ( (object)nt != (object)  nsMgr.NameTable ) {
                 throw new XmlException(Res.Xml_NotSameNametable);
             }
             _nt = nt;
         }
     }
     else {
         _nt = nt;
     }
     
     _nsMgr              = nsMgr;
     _docTypeName        = (null == docTypeName ? String.Empty : docTypeName);
     _pubId              = (null == pubId ? String.Empty : pubId);
     _sysId              = (null == sysId ? String.Empty : sysId);
     _internalSubset     = (null == internalSubset ? String.Empty : internalSubset);
     _baseURI            = (null == baseURI ? String.Empty : baseURI);
     _xmlLang            = (null == xmlLang ? String.Empty : xmlLang);
     _xmlSpace           = xmlSpace;
     _encoding           = enc;
     
 }
开发者ID:ArildF,项目名称:masters,代码行数:32,代码来源:xmlparsercontext.cs

示例2: XmlNamespaceManager

	// Constructor.
	public XmlNamespaceManager(XmlNameTable nameTable)
			{
				// Validate the parameters.
				if(nameTable == null)
				{
					throw new ArgumentNullException("nameTable");
				}

				// Record the name table for later.
				this.nameTable = nameTable;

				// Add special namespaces for "xml" and "xmlns".
				xmlCompareQuick = nameTable.Add("xml");
				xmlNsCompareQuick = nameTable.Add("xmlns");
				namespaces = new NamespaceInfo
					(xmlCompareQuick,
					 nameTable.Add(XmlDocument.xmlnsXml),
					 null);
				namespaces = new NamespaceInfo
					(xmlNsCompareQuick,
					 nameTable.Add(XmlDocument.xmlns),
					 namespaces);

				// Mark the position of the outermost scope level.
				namespaces = new NamespaceInfo(null, String.Empty, namespaces);
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:27,代码来源:XmlNamespaceManager.cs

示例3: XmlCsvReader

 /// <summary>
 /// Construct an XmlCsvReader.
 /// </summary>
 /// <param name="input">The .csv input stream</param>
 /// <param name="baseUri">The base URI of the .csv.</param>
 /// <param name="nametable">The nametable to use for atomizing element names</param>
 public XmlCsvReader(Stream input, Encoding encoding, Uri baseUri, XmlNameTable nametable)
 {
     _baseUri = baseUri;
     _encoding = encoding;
     _csvReader = new CsvReader(input, encoding, 4096);
     _nt = nametable;
 }
开发者ID:Dronacharya-Org,项目名称:Dronacharya,代码行数:13,代码来源:XmlCsvReader.cs

示例4: TryParseValue

 internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
 {
     typedValue = null;
     Exception exception = DatatypeImplementation.binaryFacetsChecker.CheckLexicalFacets(ref s, this);
     if (exception == null)
     {
         byte[] buffer = null;
         try
         {
             buffer = XmlConvert.FromBinHexString(s, false);
         }
         catch (ArgumentException exception2)
         {
             return exception2;
         }
         catch (XmlException exception3)
         {
             return exception3;
         }
         exception = DatatypeImplementation.binaryFacetsChecker.CheckValueFacets(buffer, this);
         if (exception == null)
         {
             typedValue = buffer;
             return null;
         }
     }
     return exception;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:28,代码来源:Datatype_hexBinary.cs

示例5: SgmlDtd

 /// <summary>
 ///     Initialises a new instance of the <see cref="SgmlDtd" /> class.
 /// </summary>
 /// <param name="name">The name of the DTD.</param>
 /// <param name="nt">
 ///     The <see cref="XmlNameTable" /> is NOT used.
 /// </param>
 public SgmlDtd(string name, XmlNameTable nt) {
     this.m_name = name;
     this.m_elements = new Dictionary<string, ElementDecl>();
     this.m_pentities = new Dictionary<string, Entity>();
     this.m_entities = new Dictionary<string, Entity>();
     this.m_sb = new StringBuilder();
 }
开发者ID:roomaroo,项目名称:coapp.powershell,代码行数:14,代码来源:SgmlDtd.cs

示例6: ParseValue

 public override object ParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr)
 {
     object obj2;
     if ((s == null) || (s.Length == 0))
     {
         throw new XmlSchemaException("Sch_EmptyAttributeValue", string.Empty);
     }
     if (nsmgr == null)
     {
         throw new ArgumentNullException("nsmgr");
     }
     try
     {
         string str;
         obj2 = XmlQualifiedName.Parse(s.Trim(), nsmgr, out str);
     }
     catch (XmlSchemaException exception)
     {
         throw exception;
     }
     catch (Exception exception2)
     {
         throw new XmlSchemaException(Res.GetString("Sch_InvalidValue", new object[] { s }), exception2);
     }
     return obj2;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:26,代码来源:Datatype_QNameXdr.cs

示例7: XmlLightNavigator

		private XmlLightNavigator(XmlNameTable names, XmlLightElement current, List<string> attrNames, int attribute)
		{
			_names = names;
			_current = current;
			_attrNames = attrNames;
			_attribute = attribute;
		}
开发者ID:modulexcite,项目名称:CSharpTest.Net.Tools,代码行数:7,代码来源:XmlLightNavigator.cs

示例8: TryParseValue

 internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
 {
     typedValue = null;
     if ((s == null) || (s.Length == 0))
     {
         return new XmlSchemaException("Sch_EmptyAttributeValue", string.Empty);
     }
     Exception exception = DatatypeImplementation.durationFacetsChecker.CheckLexicalFacets(ref s, this);
     if (exception == null)
     {
         XsdDuration duration;
         exception = XsdDuration.TryParse(s, XsdDuration.DurationType.YearMonthDuration, out duration);
         if (exception == null)
         {
             TimeSpan span;
             exception = duration.TryToTimeSpan(XsdDuration.DurationType.YearMonthDuration, out span);
             if (exception == null)
             {
                 exception = DatatypeImplementation.durationFacetsChecker.CheckValueFacets(span, this);
                 if (exception == null)
                 {
                     typedValue = span;
                     return null;
                 }
             }
         }
     }
     return exception;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:29,代码来源:Datatype_yearMonthDuration.cs

示例9: XNodeReader

 internal XNodeReader(XNode node, XmlNameTable nameTable, ReaderOptions options)
 {
     this.source = node;
     this.root = node;
     this.nameTable = (nameTable != null) ? nameTable : CreateNameTable();
     this.omitDuplicateNamespaces = (options & ReaderOptions.OmitDuplicateNamespaces) != ReaderOptions.None;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:XNodeReader.cs

示例10: TryParseValue

 internal override Exception TryParseValue(string s, XmlNameTable nameTable, IXmlNamespaceResolver nsmgr, out object typedValue)
 {
     typedValue = null;
     if ((s == null) || (s.Length == 0))
     {
         return new XmlSchemaException("Sch_EmptyAttributeValue", string.Empty);
     }
     Exception exception = DatatypeImplementation.qnameFacetsChecker.CheckLexicalFacets(ref s, this);
     if (exception == null)
     {
         XmlQualifiedName name = null;
         try
         {
             string str;
             name = XmlQualifiedName.Parse(s, nsmgr, out str);
         }
         catch (ArgumentException exception2)
         {
             return exception2;
         }
         catch (XmlException exception3)
         {
             return exception3;
         }
         exception = DatatypeImplementation.qnameFacetsChecker.CheckValueFacets(name, this);
         if (exception == null)
         {
             typedValue = name;
             return null;
         }
     }
     return exception;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:33,代码来源:Datatype_NOTATION.cs

示例11: AddColumnSchema

 private bool AddColumnSchema(XmlNameTable nameTable, DataColumn col, XmlNodeIdHashtable columns)
 {
     string array = XmlConvert.EncodeLocalName(col.ColumnName);
     string localName = nameTable.Get(array);
     if (localName == null)
     {
         localName = nameTable.Add(array);
     }
     col.encodedColumnName = localName;
     string namespaceURI = nameTable.Get(col.Namespace);
     if (namespaceURI == null)
     {
         namespaceURI = nameTable.Add(col.Namespace);
     }
     else if (col._columnUri != null)
     {
         col._columnUri = namespaceURI;
     }
     XmlNodeIdentety identety = new XmlNodeIdentety(localName, namespaceURI);
     columns[identety] = col;
     if (col.ColumnName.StartsWith("xml", StringComparison.OrdinalIgnoreCase))
     {
         this.HandleSpecialColumn(col, nameTable, columns);
     }
     return true;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:26,代码来源:XmlToDatasetMap.cs

示例12: XmlPathProcessor

		public XmlPathProcessor(IList<XmlMatch> matchList, Action<XmlReader> action,
			XmlNameTable readerNameTable)
		{
			Guard.ArgumentNotNull(readerNameTable, "readerNameTable");

			Initialize(matchList, action, new XmlNamespaceManager(readerNameTable));
		}
开发者ID:zanyants,项目名称:mvp.xml,代码行数:7,代码来源:XmlPathProcessor.cs

示例13: XmlSchemaValidator

 public XmlSchemaValidator(XmlNameTable nameTable, XmlSchemaSet schemas, IXmlNamespaceResolver namespaceResolver, XmlSchemaValidationFlags validationFlags)
 {
     if (nameTable == null)
     {
         throw new ArgumentNullException("nameTable");
     }
     if (schemas == null)
     {
         throw new ArgumentNullException("schemas");
     }
     if (namespaceResolver == null)
     {
         throw new ArgumentNullException("namespaceResolver");
     }
     this.nameTable = nameTable;
     this.nsResolver = namespaceResolver;
     this.validationFlags = validationFlags;
     if (((validationFlags & XmlSchemaValidationFlags.ProcessInlineSchema) != XmlSchemaValidationFlags.None) || ((validationFlags & XmlSchemaValidationFlags.ProcessSchemaLocation) != XmlSchemaValidationFlags.None))
     {
         this.schemaSet = new XmlSchemaSet(nameTable);
         this.schemaSet.ValidationEventHandler += schemas.GetEventHandler();
         this.schemaSet.CompilationSettings = schemas.CompilationSettings;
         this.schemaSet.XmlResolver = schemas.GetResolver();
         this.schemaSet.Add(schemas);
         this.validatedNamespaces = new Hashtable();
     }
     else
     {
         this.schemaSet = schemas;
     }
     this.Init();
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:32,代码来源:XmlSchemaValidator.cs

示例14: RecordBuilder

 internal RecordBuilder(RecordOutput output, XmlNameTable nameTable) {
     Debug.Assert(output != null);
     this.output    = output;
     this.nameTable = nameTable != null ? nameTable : new NameTable();
     this.atoms     = new OutKeywords(this.nameTable);
     this.scopeManager   = new OutputScopeManager(this.nameTable, this.atoms);
 }
开发者ID:uQr,项目名称:referencesource,代码行数:7,代码来源:RecordBuilder.cs

示例15: XmlTextReader

	protected XmlTextReader(XmlNameTable nt)
			{
				if(nt == null)
				{
					throw new ArgumentNullException("nt");
				}

				namespaces = true;
				normalize = false;
				depth = 0;
				readState = ReadState.Initial;
				whitespace = WhitespaceHandling.All;

				xmlBaseName = nt.Add("xml:base");
				xmlLangName = nt.Add("xml:lang");
				xmlSpaceName = nt.Add("xml:space");
				xmlNSPrefix = nt.Add("xmlns");
				xmlCompareQuick = nt.Add("xml");

				contextSupport = false;
				hasRoot = true;
				incDepth = false;
				xmlPopScope = false;
				xmlnsPopScope = false;
				sawPreserve = -1;
				state = State.XmlDeclaration;
				elementNames = new Stack();
				nodes = new NodeManager(nt, new ErrorHandler(Error));
				input = new XmlParserInput
					(null, nt, new EOFHandler(HandleEOF), new ErrorHandler(Error));
				context = new XmlParserContext
					(nt, new XmlNamespaceManager(nt), String.Empty, XmlSpace.None);
				resolver = new XmlUrlResolver();
				dtdReader = new XmlDTDReader(context);
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:35,代码来源:XmlTextReader.cs


注:本文中的System.Xml.XmlNameTable类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。