EDN Admin
Well-known member
<span style="font-size:x-small <span style="font-size:x-small
<span style="color:#2b91af; font-size:x-small <span style="color:#2b91af; font-size:x-small XmlDocument<span style="font-size:x-small doc =
<span style="color:#0000ff; font-size:x-small <span style="color:#0000ff; font-size:x-small new<span style="font-size:x-small
<span style="color:#2b91af; font-size:x-small <span style="color:#2b91af; font-size:x-small XmlDocument<span style="font-size:x-small ();<span style="font-size:x-small <span style="font-size:x-small
<span style="font-size:x-small
doc.Load(
<span style="color:#a31515; font-size:x-small <span style="color:#a31515; font-size:x-small @"D:\KB_Config.xml"<span style="font-size:x-small );
<span style="color:#0000ff; font-size:x-small <span style="color:#0000ff; font-size:x-small foreach<span style="font-size:x-small (<span style="color:#2b91af; font-size:x-small <span style="color:#2b91af; font-size:x-small XmlNode<span style="font-size:x-small
node <span style="color:#0000ff; font-size:x-small <span style="color:#0000ff; font-size:x-small in<span style="font-size:x-small nodeList)<span style="font-size:x-small <span style="font-size:x-small <span style="color:#2b91af; font-size:x-small <span style="color:#2b91af; font-size:x-small XmlNodeList<span style="font-size:x-small
nodeList = doc.SelectNodes(<span style="color:#a31515; font-size:x-small <span style="color:#a31515; font-size:x-small "KB//Default"<span style="font-size:x-small );<span style="font-size:x-small <span style="font-size:x-small <span style="font-size:x-small
{
<span style="font-size:x-small <span style="font-size:x-small <span style="font-size:x-small
node.Attributes[
<span style="color:#a31515; font-size:x-small <span style="color:#a31515; font-size:x-small "UNCPath"<span style="font-size:x-small ].Value = textBox5.Text; //error in this line object reference not set to instance of an object<span style="font-size:x-small <span style="font-size:x-small <span style="font-size:x-small <span style="font-size:x-small <span style="color:#2b91af; font-size:x-small <span style="color:#2b91af; font-size:x-small MessageBox<span style="font-size:x-small .Show(<span style="color:#a31515; font-size:x-small <span style="color:#a31515; font-size:x-small "done"<span style="font-size:x-small );<span style="font-size:x-small <span style="font-size:x-small
doc.Save(
<span style="color:#a31515; font-size:x-small <span style="color:#a31515; font-size:x-small @"D:\KB_Config.xml"<span style="font-size:x-small );
<span style="font-size:x-small
}
my xml file<span style="font-size:x-small <span style="font-size:x-small <span style="font-size:x-small <span style="font-size:x-small <span style="font-size:x-small <span style="font-size:x-small <span style="font-size:x-small <span style="font-size:x-small
<div style="text-indent:-2em file:///D:/KB_Config.xml# <span style="font-family:Courier New; color:#ff0000 -
<span><span style="color:#0000ff <<span><span style="color:#990000 KB<span><span style="color:#0000ff >
<div style="text-indent:-2em file:///D:/KB_Config.xml# <span style="font-family:Courier New; color:#ff0000 -
<span><span style="color:#0000ff <<span><span style="color:#990000 ServerLocation<span><span style="color:#0000ff >
<div style="text-indent:-2em <span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff <<span><span style="color:#990000 Active<span><span style="color:#0000ff ><span> Default <span><span style="color:#0000ff </<span><span style="color:#990000 Active<span><span style="color:#0000ff >
<span><a rel="nofollow <span style="font-family:Courier New; color:#ff0000 -
<span><span style="color:#0000ff <!-- <span id="x_x_x_clean
<pre><span style="font-family:Courier New; color:#888888; font-size:small "Default", "Custom" [/code]
<span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff -->
<div style="text-indent:-2em <span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff <<span><span style="color:#990000 Pathtype<span><span style="color:#0000ff ><span> path <span><span style="color:#0000ff </<span><span style="color:#990000 Pathtype<span><span style="color:#0000ff >
<span><a rel="nofollow <span style="font-family:Courier New; color:#ff0000 -
<span><span style="color:#0000ff <!-- <span id="x_x_x_clean
<pre><span style="font-family:Courier New; color:#888888; font-size:small "path", "unc" [/code]
<span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff -->
<div style="text-indent:-2em file:///D:/KB_Config.xml# <span style="font-family:Courier New; color:#ff0000 -
<span><span style="color:#0000ff <<span><span style="color:#990000 Default<span><span style="color:#0000ff >
<div style="text-indent:-2em <span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff <<span><span style="color:#990000 KBSrvVer<span><span style="color:#0000ff ><span> 4.6 <span><span style="color:#0000ff </<span><span style="color:#990000 KBSrvVer<span><span style="color:#0000ff >
<div style="text-indent:-2em <span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff <<span><span style="color:#990000 Path<span><span style="color:#0000ff ><span> CrogramDataPST_ServerKnowledge_Builder <span><span style="color:#0000ff </<span><span style="color:#990000 Path<span><span style="color:#0000ff >
<div style="text-indent:-2em <span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff <<span><span style="color:#990000 UNCPath<span><span style="color:#0000ff ><span> \WIN-RG7T5KWYMP1PSTServerKnowledge_Builder <span><span style="color:#0000ff </<span><span style="color:#990000 UNCPath<span><span style="color:#0000ff >
<span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff </<span><span style="color:#990000 Default<span><span style="color:#0000ff >
<div style="text-indent:-2em file:///D:/KB_Config.xml# <span style="font-family:Courier New; color:#ff0000 -
<span><span style="color:#0000ff <<span><span style="color:#990000 Custom<span><span style="color:#0000ff >
<div style="text-indent:-2em <span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff <<span><span style="color:#990000 KBSrvVer<span><span style="color:#0000ff ><span> 4.6 <span><span style="color:#0000ff </<span><span style="color:#990000 KBSrvVer<span><span style="color:#0000ff >
<div style="text-indent:-2em <span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff <<span><span style="color:#990000 Path<span><span style="color:#0000ff ><span> input path value <span><span style="color:#0000ff </<span><span style="color:#990000 Path<span><span style="color:#0000ff >
<div style="text-indent:-2em <span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff <<span><span style="color:#990000 UNCPath<span><span style="color:#0000ff ><span> unc path value <span><span style="color:#0000ff </<span><span style="color:#990000 UNCPath<span><span style="color:#0000ff >
<span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff </<span><span style="color:#990000 Custom<span><span style="color:#0000ff >
<span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff </<span><span style="color:#990000 ServerLocation<span><span style="color:#0000ff >
<div style="text-indent:-2em file:///D:/KB_Config.xml# <span style="font-family:Courier New; color:#ff0000 -
<span><span style="color:#0000ff <<span><span style="color:#990000 Fav<span><span style="color:#0000ff >
<span><a rel="nofollow <span style="font-family:Courier New; color:#ff0000 -
<span><span style="color:#0000ff <!-- <span id="x_x_x_clean
<pre><span style="font-family:Courier New; color:#888888; font-size:small "ApplicationData", "CommonApplicationData", "CommonProgramFiles", "Favorites", "LocalApplicationData", "MyDocuments", "Personal"[/code]
<span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff -->
<div style="text-indent:-2em <span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff <<span><span style="color:#990000 Location<span><span style="color:#0000ff ><span> CommonApplicationData <span><span style="color:#0000ff </<span><span style="color:#990000 Location<span><span style="color:#0000ff >
<span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff </<span><span style="color:#990000 Fav<span><span style="color:#0000ff >
<div style="text-indent:-2em <span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff <<span><span style="color:#990000 UNCPATH<span><span style="color:#0000ff ><span> 5555 <span><span style="color:#0000ff </<span><span style="color:#990000 UNCPATH<span><span style="color:#0000ff >
<span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff </<span><span style="color:#990000 KB<span><span style="color:#0000ff >
<br/>
<br/>
View the full article
<span style="color:#2b91af; font-size:x-small <span style="color:#2b91af; font-size:x-small XmlDocument<span style="font-size:x-small doc =
<span style="color:#0000ff; font-size:x-small <span style="color:#0000ff; font-size:x-small new<span style="font-size:x-small
<span style="color:#2b91af; font-size:x-small <span style="color:#2b91af; font-size:x-small XmlDocument<span style="font-size:x-small ();<span style="font-size:x-small <span style="font-size:x-small
<span style="font-size:x-small
doc.Load(
<span style="color:#a31515; font-size:x-small <span style="color:#a31515; font-size:x-small @"D:\KB_Config.xml"<span style="font-size:x-small );
<span style="color:#0000ff; font-size:x-small <span style="color:#0000ff; font-size:x-small foreach<span style="font-size:x-small (<span style="color:#2b91af; font-size:x-small <span style="color:#2b91af; font-size:x-small XmlNode<span style="font-size:x-small
node <span style="color:#0000ff; font-size:x-small <span style="color:#0000ff; font-size:x-small in<span style="font-size:x-small nodeList)<span style="font-size:x-small <span style="font-size:x-small <span style="color:#2b91af; font-size:x-small <span style="color:#2b91af; font-size:x-small XmlNodeList<span style="font-size:x-small
nodeList = doc.SelectNodes(<span style="color:#a31515; font-size:x-small <span style="color:#a31515; font-size:x-small "KB//Default"<span style="font-size:x-small );<span style="font-size:x-small <span style="font-size:x-small <span style="font-size:x-small
{
<span style="font-size:x-small <span style="font-size:x-small <span style="font-size:x-small
node.Attributes[
<span style="color:#a31515; font-size:x-small <span style="color:#a31515; font-size:x-small "UNCPath"<span style="font-size:x-small ].Value = textBox5.Text; //error in this line object reference not set to instance of an object<span style="font-size:x-small <span style="font-size:x-small <span style="font-size:x-small <span style="font-size:x-small <span style="color:#2b91af; font-size:x-small <span style="color:#2b91af; font-size:x-small MessageBox<span style="font-size:x-small .Show(<span style="color:#a31515; font-size:x-small <span style="color:#a31515; font-size:x-small "done"<span style="font-size:x-small );<span style="font-size:x-small <span style="font-size:x-small
doc.Save(
<span style="color:#a31515; font-size:x-small <span style="color:#a31515; font-size:x-small @"D:\KB_Config.xml"<span style="font-size:x-small );
<span style="font-size:x-small
}
my xml file<span style="font-size:x-small <span style="font-size:x-small <span style="font-size:x-small <span style="font-size:x-small <span style="font-size:x-small <span style="font-size:x-small <span style="font-size:x-small <span style="font-size:x-small
<div style="text-indent:-2em file:///D:/KB_Config.xml# <span style="font-family:Courier New; color:#ff0000 -
<span><span style="color:#0000ff <<span><span style="color:#990000 KB<span><span style="color:#0000ff >
<div style="text-indent:-2em file:///D:/KB_Config.xml# <span style="font-family:Courier New; color:#ff0000 -
<span><span style="color:#0000ff <<span><span style="color:#990000 ServerLocation<span><span style="color:#0000ff >
<div style="text-indent:-2em <span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff <<span><span style="color:#990000 Active<span><span style="color:#0000ff ><span> Default <span><span style="color:#0000ff </<span><span style="color:#990000 Active<span><span style="color:#0000ff >
<span><a rel="nofollow <span style="font-family:Courier New; color:#ff0000 -
<span><span style="color:#0000ff <!-- <span id="x_x_x_clean
<pre><span style="font-family:Courier New; color:#888888; font-size:small "Default", "Custom" [/code]
<span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff -->
<div style="text-indent:-2em <span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff <<span><span style="color:#990000 Pathtype<span><span style="color:#0000ff ><span> path <span><span style="color:#0000ff </<span><span style="color:#990000 Pathtype<span><span style="color:#0000ff >
<span><a rel="nofollow <span style="font-family:Courier New; color:#ff0000 -
<span><span style="color:#0000ff <!-- <span id="x_x_x_clean
<pre><span style="font-family:Courier New; color:#888888; font-size:small "path", "unc" [/code]
<span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff -->
<div style="text-indent:-2em file:///D:/KB_Config.xml# <span style="font-family:Courier New; color:#ff0000 -
<span><span style="color:#0000ff <<span><span style="color:#990000 Default<span><span style="color:#0000ff >
<div style="text-indent:-2em <span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff <<span><span style="color:#990000 KBSrvVer<span><span style="color:#0000ff ><span> 4.6 <span><span style="color:#0000ff </<span><span style="color:#990000 KBSrvVer<span><span style="color:#0000ff >
<div style="text-indent:-2em <span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff <<span><span style="color:#990000 Path<span><span style="color:#0000ff ><span> CrogramDataPST_ServerKnowledge_Builder <span><span style="color:#0000ff </<span><span style="color:#990000 Path<span><span style="color:#0000ff >
<div style="text-indent:-2em <span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff <<span><span style="color:#990000 UNCPath<span><span style="color:#0000ff ><span> \WIN-RG7T5KWYMP1PSTServerKnowledge_Builder <span><span style="color:#0000ff </<span><span style="color:#990000 UNCPath<span><span style="color:#0000ff >
<span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff </<span><span style="color:#990000 Default<span><span style="color:#0000ff >
<div style="text-indent:-2em file:///D:/KB_Config.xml# <span style="font-family:Courier New; color:#ff0000 -
<span><span style="color:#0000ff <<span><span style="color:#990000 Custom<span><span style="color:#0000ff >
<div style="text-indent:-2em <span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff <<span><span style="color:#990000 KBSrvVer<span><span style="color:#0000ff ><span> 4.6 <span><span style="color:#0000ff </<span><span style="color:#990000 KBSrvVer<span><span style="color:#0000ff >
<div style="text-indent:-2em <span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff <<span><span style="color:#990000 Path<span><span style="color:#0000ff ><span> input path value <span><span style="color:#0000ff </<span><span style="color:#990000 Path<span><span style="color:#0000ff >
<div style="text-indent:-2em <span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff <<span><span style="color:#990000 UNCPath<span><span style="color:#0000ff ><span> unc path value <span><span style="color:#0000ff </<span><span style="color:#990000 UNCPath<span><span style="color:#0000ff >
<span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff </<span><span style="color:#990000 Custom<span><span style="color:#0000ff >
<span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff </<span><span style="color:#990000 ServerLocation<span><span style="color:#0000ff >
<div style="text-indent:-2em file:///D:/KB_Config.xml# <span style="font-family:Courier New; color:#ff0000 -
<span><span style="color:#0000ff <<span><span style="color:#990000 Fav<span><span style="color:#0000ff >
<span><a rel="nofollow <span style="font-family:Courier New; color:#ff0000 -
<span><span style="color:#0000ff <!-- <span id="x_x_x_clean
<pre><span style="font-family:Courier New; color:#888888; font-size:small "ApplicationData", "CommonApplicationData", "CommonProgramFiles", "Favorites", "LocalApplicationData", "MyDocuments", "Personal"[/code]
<span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff -->
<div style="text-indent:-2em <span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff <<span><span style="color:#990000 Location<span><span style="color:#0000ff ><span> CommonApplicationData <span><span style="color:#0000ff </<span><span style="color:#990000 Location<span><span style="color:#0000ff >
<span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff </<span><span style="color:#990000 Fav<span><span style="color:#0000ff >
<div style="text-indent:-2em <span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff <<span><span style="color:#990000 UNCPATH<span><span style="color:#0000ff ><span> 5555 <span><span style="color:#0000ff </<span><span style="color:#990000 UNCPATH<span><span style="color:#0000ff >
<span> <span style="font-family:Courier New; color:#ff0000
<span><span style="color:#0000ff </<span><span style="color:#990000 KB<span><span style="color:#0000ff >
<br/>
<br/>
View the full article