You'll need to properly specify and use namespaces. XmlDocument doc = new XmlDocument();
doc.Load(@"c:\temp\MySource.wxs"); XmlNamespaceManager xmlnsManager = new XmlNamespaceManager(doc.NameTable); xmlnsManager.AddNamespace("wix", " http://schemas.microsoft.com/wix/2006/wi"); XmlElement root = doc.DocumentElement; root.SelectSingleNode("wix:produ...@manufacturer]"); Edwin G. Castro Software Developer - Staff Electronic Banking Services Fiserv Office: 503-746-0643 Fax: 503-617-0291 www.fiserv.com Please consider the environment before printing this e-mail > -----Original Message----- > From: sangeeta1 [mailto:snmsn...@gmail.com] > Sent: Thursday, December 09, 2010 10:01 AM > To: wix-users@lists.sourceforge.net > Subject: [WiX-users] Question on parsing wix file using XmlDocument. > > > I am trying to get a node value from SelectSingleNode() by passing a xpath > query but keep getting null. > > > XmlDocument doc = new XmlDocument(); > > doc.Load(@"c:\temp\MySource.wxs"); > > XmlElement root = doc.DocumentElement; > > root.SelectSingleNode("produ...@manufacturer]"); ---- returns null > > > > Can some one show an example to retrieve nodes from a .wxs file? > doc.LoadXml(filename) throws an exception due to encoding - UTF-8. > > > > thanks! > > -- > View this message in context: http://windows-installer-xml-wix- > toolset.687559.n2.nabble.com/Question-on-parsing-wix-file-using- > XmlDocument-tp5819875p5819875.html > Sent from the wix-users mailing list archive at Nabble.com. > ------------------------------------------------------------------------------ > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users