'
' Created by SharpDevelop.
' User: Jan
' Date: 27.3.2014
' Time: 18:44
' 
' To change this template use Tools | Options | Coding | Edit Standard Headers.
'
Imports System.Xml
Imports System.Data
Public Class CXMLhandling
	
	Public Function vypisZak(ByVal cislo As String) As String
		Dim App_Path = New System.IO.FileInfo(Application.ExecutablePath).DirectoryName
        Dim doc As XmlDocument = New XmlDocument()
        doc.Load(App_Path & "\data\otazkyzakony.xml")
        Dim root As XmlNode = doc.DocumentElement
	    Dim otazka1 As XmlNode = root.SelectSingleNode("/resources/otazka"&cislo)
	    Dim ot1 As String = otazka1.Attributes.ItemOf("ot"&cislo).InnerText
	    vypisZak = ot1	    
	End Function
	
	Public Function vypisZakOdp(ByVal cislo As String) As String
		Dim App_Path = New System.IO.FileInfo(Application.ExecutablePath).DirectoryName
        Dim doc As XmlDocument = New XmlDocument()
        doc.Load(App_Path & "\data\otazkyzakony.xml")
        Dim root As XmlNode = doc.DocumentElement
	    Dim otazka1 As XmlNode = root.SelectSingleNode("/resources/odpoved"&cislo)
	    Dim ot1 As String = otazka1.Attributes.ItemOf("od"&cislo).InnerText
	    vypisZakOdp = ot1	    
	End Function
	
	

End Class
