コード例 #1
0
        Location FindProductElementEndLocation(ITextEditor textEditor, WixDocument document)
        {
            XmlElement        productElement = document.GetProduct();
            string            productId      = productElement.GetAttribute("Id");
            WixDocumentReader wixReader      = new WixDocumentReader(textEditor.Document.Text);

            return(wixReader.GetEndElementLocation("Product", productId));
        }
コード例 #2
0
		public void Init()
		{
			doc = new WixDocument();
			doc.FileName = @"C:\Projects\Setup\Files.wxs";
			doc.LoadXml(GetWixXml());
			XmlElement productElement = doc.GetProduct();
			WixXmlAttributeCollection attributes = wixSchema.GetAttributes(productElement);
			productIdAttribute = attributes["Id"];
			productUpgradeCodeAttribute = attributes["UpgradeCode"];
			
			XmlElement componentElement = (XmlElement)doc.SelectSingleNode("//w:Component", new WixNamespaceManager(doc.NameTable));
			attributes = wixSchema.GetAttributes(componentElement);
			componentGuidAttribute = attributes["Guid"];
			componentKeyPathAttribute = attributes["KeyPath"];
			
			XmlElement fileElement = (XmlElement)doc.SelectSingleNode("//w:File", new WixNamespaceManager(doc.NameTable));
			attributes = wixSchema.GetAttributes(fileElement);
			fileSourceAttribute = attributes["Source"];
			fileSrcAttribute = attributes["src"];
		}
コード例 #3
0
		TextLocation FindProductElementEndLocation(ITextEditor textEditor, WixDocument document)
		{
			XmlElement productElement = document.GetProduct();
			string productId = productElement.GetAttribute("Id");
			WixDocumentReader wixReader = new WixDocumentReader(textEditor.Document.Text);
			return wixReader.GetEndElementLocation("Product", productId);
		}