commit d104f5fa4de8a3826fc80ce972919d4633d67fd9 Author: Date: Mon May 21 02:57:06 2018 +0300 first diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1ff0c42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c25d388 --- /dev/null +++ b/.gitignore @@ -0,0 +1,157 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +build/ +[Bb]in/ +[Oo]bj/ +.vs/ + +# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets +!packages/*/build/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.scc + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml + +# NuGet Packages Directory +## TODO: If you have NuGet Package Restore enabled, uncomment the next line +#packages/ + +# Windows Azure Build Output +csx +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml +*.pfx +*.publishsettings + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +App_Data/*.mdf +App_Data/*.ldf + + +#LightSwitch generated files +GeneratedArtifacts/ +_Pvt_Extensions/ +ModelManifest.xml + +# ========================= +# Windows detritus +# ========================= + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac desktop service store files +.DS_Store diff --git a/VXML/App.config b/VXML/App.config new file mode 100644 index 0000000..d1428ad --- /dev/null +++ b/VXML/App.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/VXML/Form1.Designer.cs b/VXML/Form1.Designer.cs new file mode 100644 index 0000000..fbc278e --- /dev/null +++ b/VXML/Form1.Designer.cs @@ -0,0 +1,72 @@ +namespace VXML +{ + partial class Form1 + { + /// + /// Обязательная переменная конструктора. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Освободить все используемые ресурсы. + /// + /// истинно, если управляемый ресурс должен быть удален; иначе ложно. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Код, автоматически созданный конструктором форм Windows + + /// + /// Требуемый метод для поддержки конструктора — не изменяйте + /// содержимое этого метода с помощью редактора кода. + /// + private void InitializeComponent() + { + this.listView1 = new System.Windows.Forms.ListView(); + this.getButton = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // listView1 + // + this.listView1.Location = new System.Drawing.Point(13, 53); + this.listView1.Name = "listView1"; + this.listView1.Size = new System.Drawing.Size(702, 230); + this.listView1.TabIndex = 0; + this.listView1.UseCompatibleStateImageBehavior = false; + // + // getButton + // + this.getButton.Location = new System.Drawing.Point(13, 13); + this.getButton.Name = "getButton"; + this.getButton.Size = new System.Drawing.Size(75, 23); + this.getButton.TabIndex = 1; + this.getButton.Text = "Get!"; + this.getButton.UseVisualStyleBackColor = true; + this.getButton.Click += new System.EventHandler(this.getButton_Click); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(727, 295); + this.Controls.Add(this.getButton); + this.Controls.Add(this.listView1); + this.Name = "Form1"; + this.Text = "Form1"; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ListView listView1; + private System.Windows.Forms.Button getButton; + } +} + diff --git a/VXML/Form1.cs b/VXML/Form1.cs new file mode 100644 index 0000000..eead2cf --- /dev/null +++ b/VXML/Form1.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace VXML +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + } + + private void getButton_Click(object sender, EventArgs e) + { + + } + } +} diff --git a/VXML/Form1.resx b/VXML/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/VXML/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/VXML/Program.cs b/VXML/Program.cs new file mode 100644 index 0000000..12acf88 --- /dev/null +++ b/VXML/Program.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace VXML +{ + static class Program + { + /// + /// Главная точка входа для приложения. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + + parser p = new parser(); + p.getXML(); + } + } +} diff --git a/VXML/Properties/AssemblyInfo.cs b/VXML/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..8577d44 --- /dev/null +++ b/VXML/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Общие сведения об этой сборке предоставляются следующим набором +// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения, +// связанные со сборкой. +[assembly: AssemblyTitle("VXML")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("VXML")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми +// для компонентов COM. Если необходимо обратиться к типу в этой сборке через +// COM, задайте атрибуту ComVisible значение TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("af1999be-6c1a-433e-8de3-cb3b73deb5f0")] + +// Сведения о версии сборки состоят из следующих четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +// Можно задать все значения или принять номер сборки и номер редакции по умолчанию. +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/VXML/Properties/Resources.Designer.cs b/VXML/Properties/Resources.Designer.cs new file mode 100644 index 0000000..fbd2754 --- /dev/null +++ b/VXML/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.36415 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace VXML.Properties { + using System; + + + /// + /// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д. + /// + // Этот класс создан автоматически классом StronglyTypedResourceBuilder + // с помощью такого средства, как ResGen или Visual Studio. + // Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen + // с параметром /str или перестройте свой проект VS. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("VXML.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Перезаписывает свойство CurrentUICulture текущего потока для всех + /// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/VXML/Properties/Resources.resx b/VXML/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/VXML/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/VXML/Properties/Settings.Designer.cs b/VXML/Properties/Settings.Designer.cs new file mode 100644 index 0000000..ffa0bbe --- /dev/null +++ b/VXML/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.36415 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace VXML.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/VXML/Properties/Settings.settings b/VXML/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/VXML/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/VXML/VXML.csproj b/VXML/VXML.csproj new file mode 100644 index 0000000..f06c5af --- /dev/null +++ b/VXML/VXML.csproj @@ -0,0 +1,86 @@ + + + + + Debug + AnyCPU + {AF1999BE-6C1A-433E-8DE3-CB3B73DEB5F0} + WinExe + VXML + VXML + v4.5 + 512 + true + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + \ No newline at end of file diff --git a/VXML/parser.cs b/VXML/parser.cs new file mode 100644 index 0000000..8a76ae9 --- /dev/null +++ b/VXML/parser.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml; +using System.Xml.XPath; +using System.IO; + +namespace VXML +{ + class parser + { + public void getXML() + { + XmlDocument doc = new XmlDocument(); + doc.Load("C:\\Users\\golubev\\Documents\\Личное\\xmlDeser\\bookstore.xml"); + XmlNode root = doc.DocumentElement; + + XmlNamespaceManager nsmg = new XmlNamespaceManager(doc.NameTable); + nsmg.AddNamespace("bk", "url:newbooks-schema"); + + XmlNode node = root.SelectSingleNode( + "descendant::bk:book[bk:author/bk:last-name='Kingsolver']", nsmg); + Console.WriteLine(node.InnerXml); + } + + + } +} diff --git a/XmlTest/App.config b/XmlTest/App.config new file mode 100644 index 0000000..8e15646 --- /dev/null +++ b/XmlTest/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/XmlTest/Program.cs b/XmlTest/Program.cs new file mode 100644 index 0000000..0d08fa2 --- /dev/null +++ b/XmlTest/Program.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml; +using System.Xml.XPath; +using System.IO; +using Wmhelp.XPath2; + +namespace XmlTest +{ + class Program + { + static void Main(string[] args) + { + XmlDocument xDoc = new XmlDocument(); + xDoc.Load("..\\..\\..\\vertical.xml"); + XmlElement xRoot = xDoc.DocumentElement; + + + + XmlNodeList childnodes = xRoot.XPath2SelectNodes("//Object[ends-with(@Name,'_oper')]"); + if (childnodes != null) + foreach (XmlNode n in childnodes) + Console.WriteLine(n.SelectSingleNode("Attribute").OuterXml); + + Console.WriteLine("Press Any Key"); + Console.ReadKey(); + + } + } +} diff --git a/XmlTest/Properties/AssemblyInfo.cs b/XmlTest/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..b86cc50 --- /dev/null +++ b/XmlTest/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Управление общими сведениями о сборке осуществляется с помощью +// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения, +// связанные со сборкой. +[assembly: AssemblyTitle("XmlTest")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("XmlTest")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Параметр ComVisible со значением FALSE делает типы в сборке невидимыми +// для COM-компонентов. Если требуется обратиться к типу в этой сборке через +// COM, задайте атрибуту ComVisible значение TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("aec2caa6-4245-4c43-ae31-0a50655887bb")] + +// Сведения о версии сборки состоят из следующих четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/XmlTest/XmlTest.csproj b/XmlTest/XmlTest.csproj new file mode 100644 index 0000000..7bfbf91 --- /dev/null +++ b/XmlTest/XmlTest.csproj @@ -0,0 +1,64 @@ + + + + + Debug + AnyCPU + {E78FB257-978B-4D79-9EAE-D62CE5169E03} + Exe + Properties + XmlTest + XmlTest + v4.5 + 512 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + ..\packages\XPath2.1.0.5.1\lib\net40\XPath2.dll + + + + + + + + + + + + + + \ No newline at end of file diff --git a/XmlTest/packages.config b/XmlTest/packages.config new file mode 100644 index 0000000..6983c38 --- /dev/null +++ b/XmlTest/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/XmlTest/storage.cs b/XmlTest/storage.cs new file mode 100644 index 0000000..05d83f3 --- /dev/null +++ b/XmlTest/storage.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace XmlTest +{ + public class OperList + { + public List Items { get; set; } + } + + public class Opers + { + private int oIndex; + +public int OIndex +{ + get { return oIndex; } + set { oIndex = value; } +} + + private int oName; + +public int OName +{ + get { return oName; } + set { oName = value; } +} + } +} diff --git a/bookstore.xml b/bookstore.xml new file mode 100644 index 0000000..38476f5 --- /dev/null +++ b/bookstore.xml @@ -0,0 +1,27 @@ + + + + The Handmaid's Tale + + Margaret + Atwood + + 19.95 + + + The Poisonwood Bible + + Barbara + Kingsolver + + 11.99 + + + The Bean Trees + + Barbara + Kingsolver + + 5.99 + + \ No newline at end of file diff --git a/fileXml.xml b/fileXml.xml new file mode 100644 index 0000000..c395a24 --- /dev/null +++ b/fileXml.xml @@ -0,0 +1,11 @@ + + + + Microsoft + 48 + + + Google + 42 + + \ No newline at end of file diff --git a/packages/XPath2.1.0.5.1/XPath2.1.0.5.1.nupkg b/packages/XPath2.1.0.5.1/XPath2.1.0.5.1.nupkg new file mode 100644 index 0000000..0b3c975 Binary files /dev/null and b/packages/XPath2.1.0.5.1/XPath2.1.0.5.1.nupkg differ diff --git a/packages/XPath2.1.0.5.1/lib/net35/XPath2.dll b/packages/XPath2.1.0.5.1/lib/net35/XPath2.dll new file mode 100644 index 0000000..1dca581 Binary files /dev/null and b/packages/XPath2.1.0.5.1/lib/net35/XPath2.dll differ diff --git a/packages/XPath2.1.0.5.1/lib/net40/XPath2.dll b/packages/XPath2.1.0.5.1/lib/net40/XPath2.dll new file mode 100644 index 0000000..96b466d Binary files /dev/null and b/packages/XPath2.1.0.5.1/lib/net40/XPath2.dll differ diff --git a/packages/XPath2.1.0.5.1/lib/netstandard2.0/XPath2.dll b/packages/XPath2.1.0.5.1/lib/netstandard2.0/XPath2.dll new file mode 100644 index 0000000..e00bc45 Binary files /dev/null and b/packages/XPath2.1.0.5.1/lib/netstandard2.0/XPath2.dll differ diff --git a/vertical.xml b/vertical.xml new file mode 100644 index 0000000..7da07b8 --- /dev/null +++ b/vertical.xml @@ -0,0 +1,46 @@ + diff --git a/xmlDeser.sln b/xmlDeser.sln new file mode 100644 index 0000000..894a1a3 --- /dev/null +++ b/xmlDeser.sln @@ -0,0 +1,44 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27130.2010 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2EE0CEFC-1C02-4908-855C-FC74F356D30C}" + ProjectSection(SolutionItems) = preProject + bookstore.xml = bookstore.xml + fileXml.xml = fileXml.xml + vertical.xml = vertical.xml + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xmlDeserWin", "xmlDeserWin\xmlDeserWin.csproj", "{74E8BC5A-D98A-435E-92F3-7EE78F8EA953}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VXML", "VXML\VXML.csproj", "{AF1999BE-6C1A-433E-8DE3-CB3B73DEB5F0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XmlTest", "XmlTest\XmlTest.csproj", "{E78FB257-978B-4D79-9EAE-D62CE5169E03}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {74E8BC5A-D98A-435E-92F3-7EE78F8EA953}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {74E8BC5A-D98A-435E-92F3-7EE78F8EA953}.Debug|Any CPU.Build.0 = Debug|Any CPU + {74E8BC5A-D98A-435E-92F3-7EE78F8EA953}.Release|Any CPU.ActiveCfg = Release|Any CPU + {74E8BC5A-D98A-435E-92F3-7EE78F8EA953}.Release|Any CPU.Build.0 = Release|Any CPU + {AF1999BE-6C1A-433E-8DE3-CB3B73DEB5F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AF1999BE-6C1A-433E-8DE3-CB3B73DEB5F0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AF1999BE-6C1A-433E-8DE3-CB3B73DEB5F0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AF1999BE-6C1A-433E-8DE3-CB3B73DEB5F0}.Release|Any CPU.Build.0 = Release|Any CPU + {E78FB257-978B-4D79-9EAE-D62CE5169E03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E78FB257-978B-4D79-9EAE-D62CE5169E03}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E78FB257-978B-4D79-9EAE-D62CE5169E03}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E78FB257-978B-4D79-9EAE-D62CE5169E03}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {7B0D958F-5E5B-4475-9277-BBBFA9AE6188} + EndGlobalSection +EndGlobal diff --git a/xmlDeserWin/App.config b/xmlDeserWin/App.config new file mode 100644 index 0000000..8e15646 --- /dev/null +++ b/xmlDeserWin/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/xmlDeserWin/Form1.Designer.cs b/xmlDeserWin/Form1.Designer.cs new file mode 100644 index 0000000..9d77f4e --- /dev/null +++ b/xmlDeserWin/Form1.Designer.cs @@ -0,0 +1,129 @@ +namespace xmlDeserWin +{ + partial class Form1 + { + /// + /// Требуется переменная конструктора. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Освободить все используемые ресурсы. + /// + /// истинно, если управляемый ресурс должен быть удален; иначе ложно. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Код, автоматически созданный конструктором форм Windows + + /// + /// Обязательный метод для поддержки конструктора - не изменяйте + /// содержимое данного метода при помощи редактора кода. + /// + private void InitializeComponent() + { + this.button1 = new System.Windows.Forms.Button(); + this.listView = new System.Windows.Forms.ListView(); + this.idField = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.nameField = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.button2 = new System.Windows.Forms.Button(); + this.button3 = new System.Windows.Forms.Button(); + this.button4 = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(12, 9); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 0; + this.button1.Text = "Parse"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // listView + // + this.listView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.listView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.idField, + this.nameField}); + this.listView.Location = new System.Drawing.Point(12, 38); + this.listView.Name = "listView"; + this.listView.Size = new System.Drawing.Size(495, 203); + this.listView.TabIndex = 1; + this.listView.UseCompatibleStateImageBehavior = false; + this.listView.View = System.Windows.Forms.View.Details; + // + // idField + // + this.idField.Text = "ID"; + this.idField.Width = 125; + // + // nameField + // + this.nameField.Text = "Name"; + this.nameField.Width = 101; + // + // button2 + // + this.button2.Location = new System.Drawing.Point(434, 9); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(75, 23); + this.button2.TabIndex = 2; + this.button2.Text = "Edit"; + this.button2.UseVisualStyleBackColor = true; + // + // button3 + // + this.button3.Location = new System.Drawing.Point(434, 247); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(75, 23); + this.button3.TabIndex = 3; + this.button3.Text = "Greate New"; + this.button3.UseVisualStyleBackColor = true; + // + // button4 + // + this.button4.Location = new System.Drawing.Point(13, 246); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(75, 23); + this.button4.TabIndex = 4; + this.button4.Text = "Load File"; + this.button4.UseVisualStyleBackColor = true; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(519, 273); + this.Controls.Add(this.button4); + this.Controls.Add(this.button3); + this.Controls.Add(this.button2); + this.Controls.Add(this.listView); + this.Controls.Add(this.button1); + this.Name = "Form1"; + this.Text = "Form1"; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button button1; + private System.Windows.Forms.ListView listView; + private System.Windows.Forms.ColumnHeader idField; + private System.Windows.Forms.ColumnHeader nameField; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.Button button4; + } +} + diff --git a/xmlDeserWin/Form1.cs b/xmlDeserWin/Form1.cs new file mode 100644 index 0000000..bd31ccb --- /dev/null +++ b/xmlDeserWin/Form1.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace xmlDeserWin +{ + public partial class Form1 : Form + { + + //Parser o = new Parser(); + //List p = new List(); + + + + public Form1() + { + InitializeComponent(); + } + + private void button1_Click(object sender, EventArgs e) + { + + //var users = o.Deser(); + + + Parser o = new Parser(); + + var users = o.Deser(); + List p = new List(); + + + + foreach (User c in users) + { + ListViewItem newItem = listView.Items.Add(c.id); + newItem.SubItems.Add(c.name); + } + } + + //public void users_Retrieve_items(object sender, RetrieveVirtualItemEventArgs e) + //{ + // if(e.ItemIndex >= 0 && e.ItemIndex < p.Count) + // { + // e.Item = new ListViewItem(p[e.ItemIndex].id); + // e.Item.SubItems.Add(p[e.ItemIndex].name); + // } + //} + } +} diff --git a/xmlDeserWin/Form1.resx b/xmlDeserWin/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/xmlDeserWin/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/xmlDeserWin/Parser.cs b/xmlDeserWin/Parser.cs new file mode 100644 index 0000000..fa090c8 --- /dev/null +++ b/xmlDeserWin/Parser.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.Xml.Serialization; +using System.Xml; +using System.IO; + +namespace xmlDeserWin +{ + class Parser + { + public IEnumerable Deser() + { + List users; + using (var reader = new StreamReader("fileXML.xml")) + { + if (reader == null) + return null; + XmlSerializer deserializer = new XmlSerializer(typeof(List), + new XmlRootAttribute("user_list")); + users = (List)deserializer.Deserialize(reader); + + return users; + } + + + } + } +} diff --git a/xmlDeserWin/Program.cs b/xmlDeserWin/Program.cs new file mode 100644 index 0000000..9436b67 --- /dev/null +++ b/xmlDeserWin/Program.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.Xml.Serialization; +using System.Xml; +using System.IO; + +namespace xmlDeserWin +{ + static class Program + { + /// + /// Главная точка входа для приложения. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + + + + } +} diff --git a/xmlDeserWin/Properties/AssemblyInfo.cs b/xmlDeserWin/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1cf621d --- /dev/null +++ b/xmlDeserWin/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Управление общими сведениями о сборке осуществляется с помощью +// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения, +// связанные со сборкой. +[assembly: AssemblyTitle("xmlDeserWin")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("xmlDeserWin")] +[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Параметр ComVisible со значением FALSE делает типы в сборке невидимыми +// для COM-компонентов. Если требуется обратиться к типу в этой сборке через +// COM, задайте атрибуту ComVisible значение TRUE для этого типа. +[assembly: ComVisible(false)] + +// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM +[assembly: Guid("8e29c26e-54a3-492c-9ff3-e63ee645c8a6")] + +// Сведения о версии сборки состоят из следующих четырех значений: +// +// Основной номер версии +// Дополнительный номер версии +// Номер сборки +// Редакция +// +// Можно задать все значения или принять номера сборки и редакции по умолчанию +// используя "*", как показано ниже: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/xmlDeserWin/Properties/Resources.Designer.cs b/xmlDeserWin/Properties/Resources.Designer.cs new file mode 100644 index 0000000..0549db4 --- /dev/null +++ b/xmlDeserWin/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программным средством. +// Версия среды выполнения: 4.0.30319.42000 +// +// Изменения в этом файле могут привести к неправильному поведению и будут утрачены, если +// код создан повторно. +// +//------------------------------------------------------------------------------ + +namespace xmlDeserWin.Properties +{ + + + /// + /// Класс ресурсов со строгим типом для поиска локализованных строк и пр. + /// + // Этот класс был автоматически создан при помощи StronglyTypedResourceBuilder + // класс с помощью таких средств, как ResGen или Visual Studio. + // Для добавления или удаления члена измените файл .ResX, а затем перезапустите ResGen + // с параметром /str или заново постройте свой VS-проект. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Возврат кэшированного экземпляра ResourceManager, используемого этим классом. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("xmlDeserWin.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Переопределяет свойство CurrentUICulture текущего потока для всех + /// подстановки ресурсов с помощью этого класса ресурсов со строгим типом. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/xmlDeserWin/Properties/Resources.resx b/xmlDeserWin/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/xmlDeserWin/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/xmlDeserWin/Properties/Settings.Designer.cs b/xmlDeserWin/Properties/Settings.Designer.cs new file mode 100644 index 0000000..222a1f1 --- /dev/null +++ b/xmlDeserWin/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace xmlDeserWin.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/xmlDeserWin/Properties/Settings.settings b/xmlDeserWin/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/xmlDeserWin/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/xmlDeserWin/storage.cs b/xmlDeserWin/storage.cs new file mode 100644 index 0000000..ebe1e7c --- /dev/null +++ b/xmlDeserWin/storage.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.Xml.Serialization; +using System.Xml; +using System.IO; + +namespace xmlDeserWin +{ + [XmlRoot("user_list")] + public class UserList + { + public UserList() { } + [XmlAttribute("user")] + public List Items { get; set; } + } + [XmlType("user")] + public class User + { + private string Id; + + public string id + { + get { return Id; } + set { Id = value; } + } + //[XmlAttribute("name")] + private string Name; + + public string name + { + get { return Name; } + set { Name = value; } + } + } +} diff --git a/xmlDeserWin/xmlDeserWin.csproj b/xmlDeserWin/xmlDeserWin.csproj new file mode 100644 index 0000000..f64f98c --- /dev/null +++ b/xmlDeserWin/xmlDeserWin.csproj @@ -0,0 +1,91 @@ + + + + + Debug + AnyCPU + {74E8BC5A-D98A-435E-92F3-7EE78F8EA953} + WinExe + Properties + xmlDeserWin + xmlDeserWin + v4.5 + 512 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + \ No newline at end of file diff --git a/xmls/КПТВ.711356.008.xml b/xmls/КПТВ.711356.008.xml new file mode 100644 index 0000000..30fd50f --- /dev/null +++ b/xmls/КПТВ.711356.008.xml @@ -0,0 +1,46 @@ + diff --git a/xmls/Крышка КПТВ.711356.008 Комплект документов.pdf b/xmls/Крышка КПТВ.711356.008 Комплект документов.pdf new file mode 100644 index 0000000..a52c13d Binary files /dev/null and b/xmls/Крышка КПТВ.711356.008 Комплект документов.pdf differ