C # Yaml Processing

I am using C # Yaml Parser mentioned on the code project site

If my Yaml looks like this

- id: tagid tag: - name: tagname value: tagvalue 

After it has been successfully analyzed, how can I access the data elements so that I can continue processing. For example, if I need to get the value "name", what code I will need to write, the document says that it uses doc.Root, but cannot find any examples of how to use it.

+6
c # yaml
source share
1 answer

I figured out how to use doc.Root

Doc.Root returns the mapping after it parsed the YAML input. I will recursively deal with this mapping to check if any data items correspond to the mapping or sequence, and then act accordingly.

This is a bit naive method, but so far it works.

Many thanks

+3
source share

All Articles