есть xml-ник следующего вида HTML: <root> <app_no KUVD="12" STAGE="Вася" /> <app_no KUVD="14" STAGE="Петя" /> </root> Формируемый следующим кодом на C#: Код (Text): OleDbCommand com = new OleDbCommand(zapros,con); OleDbDataReader reader = com.ExecuteReader(); XmlDocument doc = new XmlDocument(); XmlNode NNode = doc.CreateElement("root"); doc.AppendChild(NNode); while(reader.Read()) { XmlNode Node = doc.CreateElement("app_no"); Node.Attributes.Append(doc.CreateAttribute("KUVD")); Node.Attributes[0].Value = reader.GetValue(0).ToString(); Node.Attributes.Append(doc.CreateAttribute("STAGE")); Node.Attributes[1].Value = reader.GetValue(1).ToString(); doc.DocumentElement.AppendChild(Node); } StreamWriter a = new StreamWrite("C:\WebServers\home\test2.ru\WWWFeeds.xml"); a.Write(NNode.OuterXml); a.Close(); При попытке прочитать этот файл при помощи php не получаю результата: PHP: <? $file = "WWWFeeds.xml"; if (file_exists($file)) { $fp = fopen($file, "r"); if ($fp) { while (!feof($fp)) { print fgets($fp,4096)." "; } } fclose($fp); } ?>
RTFM http://ru.php.net/manual/ru/simplexml.examples-basic.php http://ru.php.net/manual/ru/refs.xml.php