本文整理汇总了C#中XmlNameTable.Add方法的典型用法代码示例。如果您正苦于以下问题:C# XmlNameTable.Add方法的具体用法?C# XmlNameTable.Add怎么用?C# XmlNameTable.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XmlNameTable
的用法示例。
在下文中一共展示了XmlNameTable.Add方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: NameCache
// Constructor.
public NameCache(XmlNameTable nt) : base(128) // avoid expanding of hashtable
{
nameTable = nt;
// only NameTable is guaranted to use String.Empty
emptyString = nt.Add(String.Empty);
}
示例2: this
: this(nameTable, schemaNames, eventHandler, new XmlSchemaCompilationSettings()) {} //Use the default for XmlSchemaCollection
public BaseProcessor(XmlNameTable nameTable, SchemaNames schemaNames, ValidationEventHandler eventHandler, XmlSchemaCompilationSettings compilationSettings) {
Debug.Assert(nameTable != null);
this.nameTable = nameTable;
this.schemaNames = schemaNames;
this.eventHandler = eventHandler;
this.compilationSettings = compilationSettings;
NsXml = nameTable.Add(XmlReservedNs.NsXml);
}
示例3: XPathNavigator
public XPathNavigator(XObject obj)
{
_obj = obj;
_nameTable = new NameTable();
_nameTable.Add(string.Empty);
_nameTable.Add("http://www.w3.org/2000/xmlns/");
_nameTable.Add("http://www.w3.org/XML/1998/namespace");
}
示例4: SchemaNames
public SchemaNames( XmlNameTable nameTable ) {
this.nameTable = nameTable;
NsDataType = nameTable.Add(XmlReservedNs.NsDataType);
NsDataTypeAlias = nameTable.Add(XmlReservedNs.NsDataTypeAlias);
NsDataTypeOld = nameTable.Add(XmlReservedNs.NsDataTypeOld);
NsXml = nameTable.Add(XmlReservedNs.NsXml);
NsXmlNs = nameTable.Add(XmlReservedNs.NsXmlNs);
NsXdr = nameTable.Add(XmlReservedNs.NsXdr);
NsXdrAlias = nameTable.Add(XmlReservedNs.NsXdrAlias);
NsXs = nameTable.Add(XmlReservedNs.NsXs);
NsXsi = nameTable.Add(XmlReservedNs.NsXsi);
XsiType = nameTable.Add("type");
XsiNil = nameTable.Add("nil");
XsiSchemaLocation = nameTable.Add("schemaLocation");
XsiNoNamespaceSchemaLocation = nameTable.Add("noNamespaceSchemaLocation");
XsdSchema = nameTable.Add("schema");
XdrSchema = nameTable.Add("Schema");
QnPCData = new XmlQualifiedName( nameTable.Add("#PCDATA") );
QnXml = new XmlQualifiedName( nameTable.Add("xml") );
QnXmlNs = new XmlQualifiedName( nameTable.Add("xmlns"), NsXmlNs );
QnDtDt = new XmlQualifiedName( nameTable.Add("dt"), NsDataType );
QnXmlLang= new XmlQualifiedName( nameTable.Add("lang"), NsXml);
// Empty namespace
QnName = new XmlQualifiedName( nameTable.Add("name") );
QnType = new XmlQualifiedName( nameTable.Add("type") );
QnMaxOccurs = new XmlQualifiedName( nameTable.Add("maxOccurs") );
QnMinOccurs = new XmlQualifiedName( nameTable.Add("minOccurs") );
QnInfinite = new XmlQualifiedName( nameTable.Add("*") );
QnModel = new XmlQualifiedName( nameTable.Add("model") );
QnOpen = new XmlQualifiedName( nameTable.Add("open") );
QnClosed = new XmlQualifiedName( nameTable.Add("closed") );
QnContent = new XmlQualifiedName( nameTable.Add("content") );
QnMixed = new XmlQualifiedName( nameTable.Add("mixed") );
QnEmpty = new XmlQualifiedName( nameTable.Add("empty") );
QnEltOnly = new XmlQualifiedName( nameTable.Add("eltOnly") );
QnTextOnly = new XmlQualifiedName( nameTable.Add("textOnly") );
QnOrder = new XmlQualifiedName( nameTable.Add("order") );
QnSeq = new XmlQualifiedName( nameTable.Add("seq") );
QnOne = new XmlQualifiedName( nameTable.Add("one") );
QnMany = new XmlQualifiedName( nameTable.Add("many") );
QnRequired = new XmlQualifiedName( nameTable.Add("required") );
QnYes = new XmlQualifiedName( nameTable.Add("yes") );
QnNo = new XmlQualifiedName( nameTable.Add("no") );
QnString = new XmlQualifiedName( nameTable.Add("string") );
QnID = new XmlQualifiedName( nameTable.Add("id") );
QnIDRef = new XmlQualifiedName( nameTable.Add("idref") );
QnIDRefs = new XmlQualifiedName( nameTable.Add("idrefs") );
QnEntity = new XmlQualifiedName( nameTable.Add("entity") );
QnEntities = new XmlQualifiedName( nameTable.Add("entities") );
QnNmToken = new XmlQualifiedName( nameTable.Add("nmtoken") );
QnNmTokens = new XmlQualifiedName( nameTable.Add("nmtokens") );
QnEnumeration = new XmlQualifiedName( nameTable.Add("enumeration") );
QnDefault = new XmlQualifiedName( nameTable.Add("default") );
//For XSD Schema
QnTargetNamespace = new XmlQualifiedName( nameTable.Add("targetNamespace") );
QnVersion = new XmlQualifiedName( nameTable.Add("version") );
QnFinalDefault = new XmlQualifiedName( nameTable.Add("finalDefault") );
QnBlockDefault = new XmlQualifiedName( nameTable.Add("blockDefault") );
QnFixed = new XmlQualifiedName( nameTable.Add("fixed") );
QnAbstract = new XmlQualifiedName( nameTable.Add("abstract") );
QnBlock = new XmlQualifiedName( nameTable.Add("block") );
QnSubstitutionGroup = new XmlQualifiedName( nameTable.Add("substitutionGroup") );
QnFinal = new XmlQualifiedName( nameTable.Add("final") );
QnNillable = new XmlQualifiedName( nameTable.Add("nillable") );
QnRef = new XmlQualifiedName( nameTable.Add("ref") );
QnBase = new XmlQualifiedName( nameTable.Add("base") );
QnDerivedBy = new XmlQualifiedName( nameTable.Add("derivedBy") );
QnNamespace = new XmlQualifiedName( nameTable.Add("namespace") );
QnProcessContents = new XmlQualifiedName( nameTable.Add("processContents") );
QnRefer = new XmlQualifiedName( nameTable.Add("refer") );
QnPublic = new XmlQualifiedName( nameTable.Add("public") );
QnSystem = new XmlQualifiedName( nameTable.Add("system") );
QnSchemaLocation = new XmlQualifiedName( nameTable.Add("schemaLocation") );
QnValue = new XmlQualifiedName( nameTable.Add("value") );
QnUse = new XmlQualifiedName( nameTable.Add("use") );
QnForm = new XmlQualifiedName( nameTable.Add("form") );
QnAttributeFormDefault = new XmlQualifiedName( nameTable.Add("attributeFormDefault") );
QnElementFormDefault = new XmlQualifiedName( nameTable.Add("elementFormDefault") );
QnSource = new XmlQualifiedName( nameTable.Add("source") );
QnMemberTypes = new XmlQualifiedName( nameTable.Add("memberTypes"));
QnItemType = new XmlQualifiedName( nameTable.Add("itemType"));
QnXPath = new XmlQualifiedName( nameTable.Add("xpath"));
// XDR namespace
QnXdrSchema = new XmlQualifiedName( XdrSchema, NsXdr );
QnXdrElementType = new XmlQualifiedName( nameTable.Add("ElementType"), NsXdr );
QnXdrElement = new XmlQualifiedName( nameTable.Add("element"), NsXdr );
QnXdrGroup = new XmlQualifiedName( nameTable.Add("group"), NsXdr );
QnXdrAttributeType = new XmlQualifiedName( nameTable.Add("AttributeType"), NsXdr );
QnXdrAttribute = new XmlQualifiedName( nameTable.Add("attribute"), NsXdr );
QnXdrDataType = new XmlQualifiedName( nameTable.Add("datatype"), NsXdr );
QnXdrDescription = new XmlQualifiedName( nameTable.Add("description"), NsXdr );
QnXdrExtends = new XmlQualifiedName( nameTable.Add("extends"), NsXdr );
// XDR alias namespace
QnXdrAliasSchema = new XmlQualifiedName( nameTable.Add("Schema"), NsDataTypeAlias );
//.........这里部分代码省略.........
示例5: Load
private void Load( XmlReader reader ) {
nt = reader.NameTable;
baseURI = reader.BaseURI;
Debug.Assert(baseURI != null, "uri can't be null, isn't it?");
xmlnsUri = (nt != null ? nt.Add(XmlReservedNs.NsXmlNs) : XmlReservedNs.NsXmlNs);
PositionInfo positionInfo = PositionInfo.GetPositionInfo(reader);
if ( reader.ReadState == ReadState.Initial ) {
if ( !reader.Read() )
return;
}
ReadChildNodes( root, baseURI, reader, positionInfo );
}
示例6: Parse
internal static XmlQualifiedName Parse(string s, XmlNameTable nameTable, XmlNamespaceManager nsmgr, out string prefix) {
int colonPos = s.IndexOf(':');
if (colonPos > 0) {
char[] text = s.ToCharArray();
prefix = nameTable.Add(text, 0, colonPos);
XmlConvert.VerifyNCName(prefix);
s = nameTable.Add(text, colonPos + 1, text.Length - colonPos - 1);
}
else {
prefix = string.Empty;
s = nameTable.Add(s);
}
XmlConvert.VerifyNCName(s);
string uri = nsmgr.LookupNamespace(prefix);
if (uri == null) {
throw new XmlException(Res.Xml_UnknownNs, prefix);
}
return new XmlQualifiedName(s, uri);
}
示例7: Atomize
internal void Atomize(XmlNameTable nameTable) {
name = nameTable.Add(name);
if (ns != string.Empty) {
ns = nameTable.Add(ns);
}
}