I am trying to parse the following page:
in order to get the value of BETA0
, BETA1
, etc....
I am struggling as it appears the webpage is in SDMX format and not regular XML. If anyone can help with a c# snippet it would be greatly appreciated.
Thank you in advance.
You can use the SDMXSource library which is available for Java and .NET.
Otherwise, if you retrieve the same data using the simpler structure specific format rather than the generic format, you can possibly parse the data easier similar to a CSV format. In order to get the structure specific format set the Accept header to 'application/vnd.sdmx.structurespecificdata+xml;version=2.1'.
You might find this cheat sheet helpful.
UPDATE:
Here is an example of parsing the strcuture specific format to produce a key/value record without using a library. It does not cover all the possible cases (for example dataset level attributes) but it's a good start and works for this particular data message.
XML:
Code: