|
XPathNodeIterator nodes = nav.Select("/MotherCompany/Compant/Department/IsPositions");
nodes.MoveNext();
XPathNavigator nodesNav = nodes.Current;
The iterator is not positioned at the start so you must move to an element before accessing anything.
only two letters away from being an asset
|
|
|
|
|
Thanks for your help and patience with me Mark. However I still dont get any thing even after putting nodes.MoveNext().
Do you think that <xs:schema>, <xs:annotation>, <xs:appinfo> (which are at the top of the document and <MotherCompany> is nested within <xs:appinfo> ) has anything to do with it?
Appreciate your help.
Regards,
Robert
|
|
|
|
|
The XmlReader probably isn't the way to go here. Load your xml into an XmlDocument and use the SelectNodes method to select the specific nodes you want, for example you could do something like this:
XmlNodeList tempPositions = myXml.SelectNodes("/Company/Department/Temp");<br />
foreach(XmlNode position in tempPositions)<br />
tempPositions.Add(position.Name);
The best thing you could do is get familiar with XPath queries and use them to extract the specific information you need from your XmlDocument.
|
|
|
|
|
plz, i need some application for educational perpose .
plz, help me .
jignesh patel
|
|
|
|
|
static void Main(string[] args)
{
Console.WriteLine("Hello, world");
}
only two letters away from being an asset
|
|
|
|
|
Best Regards,
Apurva Kaushal
|
|
|
|
|
How can I run a flash file inside an asp .net page?
|
|
|
|
|
|
plz send some .net projects using asp.net,c#,sqlserver2000
|
|
|
|
|
Why? Where to?
---
b { font-weight: normal; }
|
|
|
|
|
r u an student or an Developer. first of all go through the "Chris" first question.
And then post ur questions.
With Regards
Satips
|
|
|
|
|
i have pag to regestration this page contain alot of textbox i want to delet the value in text boxses after end regestration
thank you for help me
ashrafhakiem
|
|
|
|
|
HI,
First say your are cerating an Windows based or Web based form??? and the platform you use
Know is Drop, Unknown is Ocean
|
|
|
|
|
|
make one for loop which counts all objects in ur page and inside on loop ask if control is textbox if so delete text property of control.
|
|
|
|
|
This will do it.
void SetAllInputControlsClassName(Control parent,
string className, string focusClassName)
{
foreach (Control ctl in parent.Controls)
{
if (ctl is TextBox || ctl is ListBox ||
ctl is DropDownList)
{
//Do stuff here
}
}
}
|
|
|
|
|
thank u for helping but i have aproblem
i iwant to clear all textbox but the
ctr.text not avalid
|
|
|
|
|
Sorry, I sent the wrong code snippet.
Try this:
private void Button1_Click(object sender, System.EventArgs e)
{
ClearAllControls( Page.FindControl("Form1"));
}
void ClearAllControls(Control parent)
{
TextBox tb = null;
foreach (Control ctl in parent.Controls)
{
if (ctl is TextBox)
{
tb = (TextBox)ctl;
tb.Text = "";
}
}
}
|
|
|
|
|
Hi Everyone,
I am c# Beginner, can u plz solve my problem like "thread was being aborted" when using try catch(Response.redirect();)
suresh babu.k
|
|
|
|
|
|
Hi Suresh Babu,
Welcome.
With Regards
Satips
|
|
|
|
|
Try google? Google search...[^] First result has your answer, you can't transfer thread control in a try catch block.
|
|
|
|
|
hi ok,
Plz solve my problem
suresh babu.k
|
|
|
|
|
|