Groups | Blog | Home
all groups > dotnet xml > april 2004 >

dotnet xml : Problem using XPathDocument


Martin Honnen
4/30/2004 4:17:04 PM


[quoted text, click to view]

What does the exception say?

--

Martin Honnen
http://JavaScript.FAQTs.com/
Atul
4/30/2004 7:33:31 PM
Hi,

I am getting XmlException while running the following code:

string sConfigXPath = Constants.CONST_CONFIG_XPATH +
"[@"+Constants.CONST_CONFIG_TYPE_ID + "="+this.iType + "]";
string sConfigFile = Constants.CONST_CONFIG_FILE_LOCATION; //Returns me
the physical path @"C:\Temp\MyXml.xml"
XPathDocument xpdConfig = new
XPathDocument(sConfigFile,XmlSpace.Default); //XmlException raised here.
XPathNavigator xpnConfig =
((IXPathNavigable)xpdConfig).CreateNavigator();
XPathNodeIterator iter = xpnConfig.Select(sConfigXPath);
while(iter.MoveNext())
{
LoadNode(iter.Current);
}

What am I missing here, please guide?
--
Thanks & Regards,
Atul Shukla

Atul
4/30/2004 7:53:55 PM
I am getting following error:

An unhandled exception of type 'System.Xml.XmlException' occurred in
system.xml.dll

Additional information: System error.

Regards,
Atul

[quoted text, click to view]

Atul
4/30/2004 8:18:24 PM
Problem Solved. I checked my XML file, it was wrong.
Sorry for the trouble.

Thanks
Atul

[quoted text, click to view]

AddThis Social Bookmark Button