salve a tutti...
al momento ho questo codice:
codice:
XmlReaderSettings settings = new XmlReaderSettings();
settings.IgnoreComments = true;
settings.IgnoreProcessingInstructions = true;
settings.IgnoreWhitespace = true;
XmlUrlResolver resolver = new XmlUrlResolver();
resolver.Credentials = System.Net.CredentialCache.DefaultCredentials;
settings.XmlResolver = resolver;
// Create the XmlReader object.
XmlReader reader = XmlReader.Create(@"d:\inetpub\webs\sito\public\export_gestionaleauto.xml", settings);
//XmlTextReader reader = new XmlTextReader(@"d:\inetpub\webs\sito\public\export_gestionaleauto.xml");
while (reader.Read())
{
switch (reader.NodeType)
{
case XmlNodeType.Element:
reader.ReadToFollowing("make");
string marca = reader.ReadElementContentAsString();
break;
}
}
il problema è che mi scrive solo i dati relativi al primo nodo, e no a tutti gli altri....
cioè ci sono tanti nodi del tipo <car>auto</car>
però mi legge solo il primo e no gli altri....
come posso fare???
grazie a tutti