Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. using namespace System;
  2. using namespace System::ComponentModel;
  3. using namespace System::Collections;
  4. using namespace System::Windows::Forms;
  5. using namespace System::Data;
  6. using namespace System::Drawing;
  7. using namespace System::IO;
  8. using namespace System::Xml;
  9.  
  10. XmlDocument ^ docVideo = gcnew XmlDocument;
  11. String ^ strFilename = L"C:UsersSaelDocumentsVisual Studio 2013ProjectsHotel_ManagementDebugtempapp.xml";
  12.  
  13. if (File::Exists(strFilename))
  14. {
  15. char *path = NULL;
  16. size_t size;
  17. path = getcwd(path, size);
  18. MessageBox(NULL, pwd, pwd, 0);
  19.  
  20. docVideo->Load(strFilename);
  21. XmlElement ^ elm = docVideo->DocumentElement;
  22. XmlNodeList ^ lstVideos = elm->ChildNodes;
  23.  
  24. MessageBox::Show("The root element contains " +
  25. lstVideos->Count + L" nodes");
  26. //txtDocument->Text = elm->InnerText;
  27. }
  28. else
  29. MessageBox::Show(L"The file " + strFilename + L" was not found");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement