Commit 4f884e6
committed
Fixed path mapping issue
The path variable at line 323 (originally line 316) was always empty because:
Root Cause: The code was trying to read the ppth attribute from the <s> element (stop.Attribute("ppth")), but according to the Deutsche Bahn Timetable API XML schema, the ppth (path) attribute is actually located on the <dp> (departure) or <ar> (arrival) child elements, not on the parent <s> (stop) element.
The Fix:
Moved the departureElement declaration earlier in the loop
Read the ppth attribute from departureElement instead of stop
Removed the duplicate departureElement declaration later in the code
Now the code correctly retrieves the path information from <dp ppth="..."> and should be able to find train connections that go through both stations.1 parent f411fa0 commit 4f884e6
1 file changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
316 | | - | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
317 | 319 | | |
318 | | - | |
| 320 | + | |
319 | 321 | | |
320 | 322 | | |
321 | 323 | | |
| |||
338 | 340 | | |
339 | 341 | | |
340 | 342 | | |
341 | | - | |
342 | 343 | | |
343 | 344 | | |
344 | 345 | | |
| |||
0 commit comments