Read XML file coded as described in DWA-M 150

read_xml_dwa_m150(xml, encoding = "ISO-8859-1")

Arguments

xml

path to XML file

encoding

encoding used in the XML file, passed to read_xml

Value

list with elements fd, hg, hi, hz, each of which is a data frame containing the corresponding data as described in DWA-M150

Examples

xml <- system.file("extdata/example.xml", package = "kwb.dwa.m150") content <- read_xml_dwa_m150(xml) str(content)
#> List of 4 #> $ fd:'data.frame': 1 obs. of 3 variables: #> ..$ xpath: chr "/DATA/FD" #> ..$ FD001: chr "04-2010" #> ..$ FD002: chr "B" #> $ hg:'data.frame': 4 obs. of 26 variables: #> ..$ hg_id: int [1:4] 1 2 3 4 #> ..$ HG001: chr [1:4] "87801006" "87802004" "88801070" "88802045" #> ..$ HG003: chr [1:4] "87801006" "87802004" "88801070" "88802045" #> ..$ HG004: chr [1:4] "87801007" "87802005" "87801006" "87802004" #> ..$ HG101: chr [1:4] "" "" "" "" #> ..$ HG102: chr [1:4] "Musterstraße" "Musterstraße" "Musterstraße" "Musterstraße" #> ..$ HG103: chr [1:4] "" "" "" "" #> ..$ HG104: chr [1:4] "Musterstadt" "Musterstadt" "Musterstadt" "Musterstadt" #> ..$ HG106: chr [1:4] "" "" "" "" #> ..$ HG301: chr [1:4] "K" "K" "K" "K" #> ..$ HG302: chr [1:4] "S" "R" "S" "R" #> ..$ HG304: chr [1:4] "PVCU" "B" "PVCU" "B" #> ..$ HG305: chr [1:4] "DN" "DN" "DN" "DN" #> ..$ HG306: chr [1:4] "250" "300" "250" "300" #> ..$ HG307: chr [1:4] "250" "300" "250" "300" #> ..$ HG308: chr [1:4] "" "" "" "" #> ..$ HG309: chr [1:4] "" "" "" "" #> ..$ HG310: chr [1:4] "7.500" "3.100" "84.600" "86.000" #> ..$ HG313: chr [1:4] "A" "A" "A" "A" #> ..$ HG314: chr [1:4] "3.000" "1.000" "3.000" "2.500" #> ..$ HG315: chr [1:4] "K" "K" "K" "K" #> ..$ HG316: chr [1:4] "" "" "" "" #> ..$ HG401: chr [1:4] "B" "B" "B" "B" #> ..$ HG404: chr [1:4] "A" "A" "A" "A" #> ..$ HG407: chr [1:4] "K" "K" "K" "K" #> ..$ HG999: chr [1:4] "" "" "" "" #> $ hi:'data.frame': 4 obs. of 26 variables: #> ..$ hg_id: int [1:4] 1 2 3 4 #> ..$ HI001: chr [1:4] "Gem. Musterstadt" "Gem. Musterstadt" "Gem. Musterstadt" "Gem. Musterstadt" #> ..$ HI002: chr [1:4] "123456" "123456" "123456" "123456" #> ..$ HI004: chr [1:4] "E" "A" "E" "A" #> ..$ HI005: chr [1:4] "DWAM149-2:2006" "DWAM149-2:2006" "DWAM149-2:2006" "DWAM149-2:2006" #> ..$ HI006: chr [1:4] "Panoramo" "Panoramo" "Panoramo" "Panoramo" #> ..$ HI007: chr [1:4] "B" "B" "B" "B" #> ..$ HI008: chr [1:4] "" "" "" "" #> ..$ HI101: chr [1:4] "I" "I" "I" "I" #> ..$ HI102: chr [1:4] "A" "A" "A" "A" #> ..$ HI103: chr [1:4] "KTV" "KTV" "KTV" "KTV" #> ..$ HI104: chr [1:4] "2015-01-26" "2015-01-26" "2015-01-26" "2015-01-26" #> ..$ HI105: chr [1:4] "09:34:00" "11:08:41" "08:52:20" "10:59:23" #> ..$ HI107: chr [1:4] "J" "J" "J" "J" #> ..$ HI109: chr [1:4] "N" "N" "N" "N" #> ..$ HI111: chr [1:4] "Onyx Rohr- und Kanal-Service GmbH" "Onyx Rohr- und Kanal-Service GmbH" "Onyx Rohr- und Kanal-Service GmbH" "Onyx Rohr- und Kanal-Service GmbH" #> ..$ HI112: chr [1:4] "Herr Diedrich" "Herr Diedrich" "Herr Diedrich" "Herr Diedrich" #> ..$ HI113: chr [1:4] "" "" "" "" #> ..$ HI114: chr [1:4] "DVD" "DVD" "DVD" "DVD" #> ..$ HI115: chr [1:4] "001" "001" "001" "001" #> ..$ HI116: chr [1:4] "87801006.ipf" "87802004.ipf" "88801070.ipf" "88802045.ipf" #> ..$ HI117: chr [1:4] "DIGFOTO" "DIGFOTO" "DIGFOTO" "DIGFOTO" #> ..$ HI201: chr [1:4] "" "" "" "" #> ..$ HI202: chr [1:4] "" "" "" "" #> ..$ HI203: chr [1:4] "" "" "" "" #> ..$ HI999: chr [1:4] "" "" "" "" #> $ hz:'data.frame': 25 obs. of 20 variables: #> ..$ hg_id: int [1:25] 1 1 2 2 3 3 3 3 3 3 ... #> ..$ hz_id: int [1:25] 1 2 1 2 1 2 3 4 5 6 ... #> ..$ HZ001: chr [1:25] "0.0" "6.5" "0.0" "2.1" ... #> ..$ HZ002: chr [1:25] "BCD" "BCE" "BCD" "BCE" ... #> ..$ HZ014: chr [1:25] "XP" "XP" "XP" "XP" ... #> ..$ HZ015: chr [1:25] "" "" "" "" ... #> ..$ HZ003: chr [1:25] "" "" "" "" ... #> ..$ HZ004: chr [1:25] "" "" "" "" ... #> ..$ HZ005: chr [1:25] "" "" "" "" ... #> ..$ HZ006: chr [1:25] "" "" "" "" ... #> ..$ HZ007: chr [1:25] "" "" "" "" ... #> ..$ HZ008: chr [1:25] "00:01:40" "00:01:50" "00:03:50" "00:04:00" ... #> ..$ HZ009: chr [1:25] "" "" "" "" ... #> ..$ HZ010: chr [1:25] "Anfangsknoten" "Endknoten" "Anfangsknoten" "Endknoten" ... #> ..$ HZ011: chr [1:25] "" "" "" "" ... #> ..$ HZ017: chr [1:25] "" "" "" "" ... #> ..$ HZ201: chr [1:25] "" "" "" "" ... #> ..$ HZ202: chr [1:25] "" "" "" "" ... #> ..$ HZ203: chr [1:25] "" "" "" "" ... #> ..$ HZ999: chr [1:25] "" "" "" "" ...