Пример #1
0
		private void LoadDocumentAsRawXml(XmlDocument document) {
			MetadataEntities = null;
			
			MetadataEntityCollection entities = new MetadataEntityCollection();
			IMetadataEntity entity = MetadataEntityFactory.LoadEntity(document);
			entities.Add(entity);
			
			MetadataEntities = entities;
			_loadedAsRawXml = true;
		}
Пример #2
0
		public void LoadXml(XmlDocument document) {
			MetadataEntities = null;
			
			if (document.DocumentElement.Name == METADATA_BASE_TAG) {
				LoadEntitiesFromNode(document.DocumentElement);
			}
			else {
				LoadDocumentAsRawXml(document);
			}
			_isNew = false;
			_metadata.OwningMetadataFile = this;
			_loadedState = this.SaveXml();
		}
Пример #3
0
		private void LoadEntitiesFromNode(XmlNode rootNode) {
			MetadataEntities = null;
			MetadataEntityCollection entities = new MetadataEntityCollection();
			foreach (XmlNode node in rootNode.ChildNodes) {
				IMetadataEntity entity = MetadataEntityFactory.LoadEntity(node);
				entities.Add(entity);
			}
			MetadataEntities = entities;
			_loadedAsRawXml = false;
		}
			public IMetadataEntityEnumerator(MetadataEntityCollection mappings) : base(mappings) {
			}