Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. Read XML from VB.NET [modified]

Read XML from VB.NET [modified]

Scheduled Pinned Locked Moved XML / XSL
csharpalgorithmsxmlhelp
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    japel
    wrote on last edited by
    #1

    Hello, I am trying to read the attached XML file by entering the and return the value for Access Allowed List. I have worked with reading simple XML elements but have not worked with atributes and the like. I am also new to both XML and Dev in general. I have read several articles but most give me examples for reading simple XML e.g. John Smith The file I am trying to read is below, any help would be great and examples are very much welcome. My goal for the GUI in VB.NET will be to have a textbox to enter string number I am searching for and a dropdown but to select the language. Regards Jason Access Allowed List Access Allowed List Access Allowed List Access Allowed List Access Allowed List Access Allowed List Lista de accesos permitidos Pääsylista sallitut Liste des accès autorisés Access Allowed List Hozzáférés Engedély Lista Elenco accessi consentiti Access Allowed List Liste over systemtilgang Access Allowed List Access Allowed List Använda tillåten lista المطبوعة: Vytisknuto: Gedruckt: Printed: Prinditud: Printed: Impreso: Tulostettu: Imprimé: Printed: Nyomtatott: Printed: Stampato: Afgedrukt: Skrevet ut Wydrukowano: Напечатано: Utskrivet:

    When people make you see red, be thankful your not colour blind. modified on Thursday, September 11, 2008 8:47 AM

    J 1 Reply Last reply
    0
    • J japel

      Hello, I am trying to read the attached XML file by entering the and return the value for Access Allowed List. I have worked with reading simple XML elements but have not worked with atributes and the like. I am also new to both XML and Dev in general. I have read several articles but most give me examples for reading simple XML e.g. John Smith The file I am trying to read is below, any help would be great and examples are very much welcome. My goal for the GUI in VB.NET will be to have a textbox to enter string number I am searching for and a dropdown but to select the language. Regards Jason Access Allowed List Access Allowed List Access Allowed List Access Allowed List Access Allowed List Access Allowed List Lista de accesos permitidos Pääsylista sallitut Liste des accès autorisés Access Allowed List Hozzáférés Engedély Lista Elenco accessi consentiti Access Allowed List Liste over systemtilgang Access Allowed List Access Allowed List Använda tillåten lista المطبوعة: Vytisknuto: Gedruckt: Printed: Prinditud: Printed: Impreso: Tulostettu: Imprimé: Printed: Nyomtatott: Printed: Stampato: Afgedrukt: Skrevet ut Wydrukowano: Напечатано: Utskrivet:

      When people make you see red, be thankful your not colour blind. modified on Thursday, September 11, 2008 8:47 AM

      J Offline
      J Offline
      japel
      wrote on last edited by
      #2

      Hello, OK I have worked out the below code to return the 'EN' string if I supply the string code, say "1000". What I need to know is understand how to search for the string and return the string code. If I would use a wildcard in this it would be great. Any Thoughts??? Private Sub XPathSearch(ByVal XMLPath As String) Dim xmlNI As XPathNodeIterator Dim xpathDoc As XPathDocument Dim xmlNav As XPathNavigator Try xpathDoc = New XPathDocument(XMLPath) xmlNav = xpathDoc.CreateNavigator() xmlNI = xmlNav.Select("/MOMLANG/STRING[@code='" & stringValue & "']/LANG[@code='EN']") While (xmlNI.MoveNext()) 'Me.RichTextBox1.AppendText(xmlNI.Current.Name + " : " + xmlNI.Current.Value & vbCrLf) Me.RichTextBox1.AppendText("String value: " + xmlNI.Current.Value & vbCrLf) End While Catch ex As XPathException System.Console.WriteLine("XMLException: " + ex.Message) Catch ex As Exception System.Console.WriteLine("Exception: " + ex.Message) End Try End Sub When people make you see red, be thankful your not colour blind.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups