Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Xml / System / Xml / Core / XmlParserContext.cs / 1305376 / XmlParserContext.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
//-----------------------------------------------------------------------------
using System.Xml;
using System.Text;
using System;
namespace System.Xml {
// Specifies the context that the XmLReader will use for xml fragment
public class XmlParserContext {
private XmlNameTable _nt = null;
private XmlNamespaceManager _nsMgr = null;
private String _docTypeName = String.Empty;
private String _pubId = String.Empty;
private String _sysId = String.Empty;
private String _internalSubset = String.Empty;
private String _xmlLang = String.Empty;
private XmlSpace _xmlSpace;
private String _baseURI = String.Empty;
private Encoding _encoding = null;
public XmlParserContext(XmlNameTable nt, XmlNamespaceManager nsMgr,String xmlLang, XmlSpace xmlSpace)
: this(nt, nsMgr, null, null, null, null, String.Empty, xmlLang, xmlSpace)
{
// Intentionally Empty
}
public XmlParserContext(XmlNameTable nt, XmlNamespaceManager nsMgr,String xmlLang, XmlSpace xmlSpace, Encoding enc)
: this(nt, nsMgr, null, null, null, null, String.Empty, xmlLang, xmlSpace, enc)
{
// Intentionally Empty
}
public XmlParserContext(XmlNameTable nt, XmlNamespaceManager nsMgr, String docTypeName,
String pubId, String sysId, String internalSubset, String baseURI,
String xmlLang, XmlSpace xmlSpace)
: this(nt, nsMgr, docTypeName, pubId, sysId, internalSubset, baseURI, xmlLang, xmlSpace, null)
{
// Intentionally Empty
}
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, string.Empty);
}
_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;
}
public XmlNameTable NameTable {
get {
return _nt;
}
set {
_nt = value;
}
}
public XmlNamespaceManager NamespaceManager {
get {
return _nsMgr;
}
set {
_nsMgr = value;
}
}
public String DocTypeName {
get {
return _docTypeName;
}
set {
_docTypeName = (null == value ? String.Empty : value);
}
}
public String PublicId {
get {
return _pubId;
}
set {
_pubId = (null == value ? String.Empty : value);
}
}
public String SystemId {
get {
return _sysId;
}
set {
_sysId = (null == value ? String.Empty : value);
}
}
public String BaseURI {
get {
return _baseURI;
}
set {
_baseURI = (null == value ? String.Empty : value);
}
}
public String InternalSubset {
get {
return _internalSubset;
}
set {
_internalSubset = (null == value ? String.Empty : value);
}
}
public String XmlLang {
get {
return _xmlLang;
}
set {
_xmlLang = (null == value ? String.Empty : value);
}
}
public XmlSpace XmlSpace {
get {
return _xmlSpace;
}
set {
_xmlSpace = value;
}
}
public Encoding Encoding {
get {
return _encoding;
}
set {
_encoding = value;
}
}
internal bool HasDtdInfo {
get {
return ( _internalSubset != string.Empty || _pubId != string.Empty || _sysId != string.Empty );
}
}
} // class XmlContext
} // namespace System.Xml
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
//-----------------------------------------------------------------------------
using System.Xml;
using System.Text;
using System;
namespace System.Xml {
// Specifies the context that the XmLReader will use for xml fragment
public class XmlParserContext {
private XmlNameTable _nt = null;
private XmlNamespaceManager _nsMgr = null;
private String _docTypeName = String.Empty;
private String _pubId = String.Empty;
private String _sysId = String.Empty;
private String _internalSubset = String.Empty;
private String _xmlLang = String.Empty;
private XmlSpace _xmlSpace;
private String _baseURI = String.Empty;
private Encoding _encoding = null;
public XmlParserContext(XmlNameTable nt, XmlNamespaceManager nsMgr,String xmlLang, XmlSpace xmlSpace)
: this(nt, nsMgr, null, null, null, null, String.Empty, xmlLang, xmlSpace)
{
// Intentionally Empty
}
public XmlParserContext(XmlNameTable nt, XmlNamespaceManager nsMgr,String xmlLang, XmlSpace xmlSpace, Encoding enc)
: this(nt, nsMgr, null, null, null, null, String.Empty, xmlLang, xmlSpace, enc)
{
// Intentionally Empty
}
public XmlParserContext(XmlNameTable nt, XmlNamespaceManager nsMgr, String docTypeName,
String pubId, String sysId, String internalSubset, String baseURI,
String xmlLang, XmlSpace xmlSpace)
: this(nt, nsMgr, docTypeName, pubId, sysId, internalSubset, baseURI, xmlLang, xmlSpace, null)
{
// Intentionally Empty
}
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, string.Empty);
}
_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;
}
public XmlNameTable NameTable {
get {
return _nt;
}
set {
_nt = value;
}
}
public XmlNamespaceManager NamespaceManager {
get {
return _nsMgr;
}
set {
_nsMgr = value;
}
}
public String DocTypeName {
get {
return _docTypeName;
}
set {
_docTypeName = (null == value ? String.Empty : value);
}
}
public String PublicId {
get {
return _pubId;
}
set {
_pubId = (null == value ? String.Empty : value);
}
}
public String SystemId {
get {
return _sysId;
}
set {
_sysId = (null == value ? String.Empty : value);
}
}
public String BaseURI {
get {
return _baseURI;
}
set {
_baseURI = (null == value ? String.Empty : value);
}
}
public String InternalSubset {
get {
return _internalSubset;
}
set {
_internalSubset = (null == value ? String.Empty : value);
}
}
public String XmlLang {
get {
return _xmlLang;
}
set {
_xmlLang = (null == value ? String.Empty : value);
}
}
public XmlSpace XmlSpace {
get {
return _xmlSpace;
}
set {
_xmlSpace = value;
}
}
public Encoding Encoding {
get {
return _encoding;
}
set {
_encoding = value;
}
}
internal bool HasDtdInfo {
get {
return ( _internalSubset != string.Empty || _pubId != string.Empty || _sysId != string.Empty );
}
}
} // class XmlContext
} // namespace System.Xml
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Roles.cs
- TrustLevel.cs
- LoginName.cs
- datacache.cs
- TextTreeRootNode.cs
- SqlFileStream.cs
- TableHeaderCell.cs
- Pen.cs
- QuerySetOp.cs
- HttpCookie.cs
- DynamicRenderer.cs
- AxHost.cs
- DataGridViewColumnCollection.cs
- ConfigurationElementProperty.cs
- SchemaConstraints.cs
- DataControlField.cs
- PageAsyncTask.cs
- LiteralDesigner.cs
- BreakRecordTable.cs
- ExpressionList.cs
- PartialTrustVisibleAssembly.cs
- PolicyDesigner.cs
- MostlySingletonList.cs
- SqlServer2KCompatibilityAnnotation.cs
- DesignerActionListCollection.cs
- SafeLibraryHandle.cs
- TrackingMemoryStreamFactory.cs
- CompoundFileReference.cs
- HttpChannelBindingToken.cs
- PostBackOptions.cs
- WebRequestModulesSection.cs
- BindingBase.cs
- _emptywebproxy.cs
- ResourceDefaultValueAttribute.cs
- TimeoutValidationAttribute.cs
- SqlCharStream.cs
- ThemeDirectoryCompiler.cs
- ScriptBehaviorDescriptor.cs
- VScrollBar.cs
- WeakHashtable.cs
- DataBindEngine.cs
- CodeArgumentReferenceExpression.cs
- XmlLangPropertyAttribute.cs
- TaskbarItemInfo.cs
- ListViewGroupCollectionEditor.cs
- OpenFileDialog.cs
- XamlFigureLengthSerializer.cs
- DeferredReference.cs
- XamlClipboardData.cs
- HandleCollector.cs
- ProfileSettingsCollection.cs
- XmlSerializerSection.cs
- CatalogZoneBase.cs
- SettingsBindableAttribute.cs
- CommandManager.cs
- ExecutionContext.cs
- UserControlBuildProvider.cs
- WmpBitmapEncoder.cs
- Message.cs
- CellCreator.cs
- NavigationService.cs
- ComplexTypeEmitter.cs
- IgnorePropertiesAttribute.cs
- CTreeGenerator.cs
- DataServiceQueryContinuation.cs
- DocumentOrderComparer.cs
- OutputCacheProfileCollection.cs
- AxDesigner.cs
- HttpConfigurationContext.cs
- ToolBar.cs
- VectorCollectionConverter.cs
- FilteredReadOnlyMetadataCollection.cs
- XmlDataCollection.cs
- QueryExecutionOption.cs
- GeometryConverter.cs
- KeyValueInternalCollection.cs
- ConstraintConverter.cs
- Base64Decoder.cs
- DataSourceControlBuilder.cs
- SqlDataSourceConfigureSortForm.cs
- Effect.cs
- BufferedGraphics.cs
- XsltArgumentList.cs
- GcHandle.cs
- WindowsAltTab.cs
- Action.cs
- TextElementCollection.cs
- MetadataExporter.cs
- PageAsyncTask.cs
- ImageUrlEditor.cs
- metadatamappinghashervisitor.cs
- DataSourceHelper.cs
- _AutoWebProxyScriptWrapper.cs
- EdmComplexPropertyAttribute.cs
- HitTestWithPointDrawingContextWalker.cs
- Facet.cs
- ProfileModule.cs
- Pts.cs
- RelationshipEntry.cs
- CapabilitiesUse.cs