Can't parse our YAML in JAVA

Help
2006-09-24
2013-04-09
  • I have the following .yaml file.(it will be expanded later). I have to read almost all the values in java. Do you have any help or user guide to work on this. If you give me an example to do this that will be great for me.

    Please see the yaml file below. Is there any problem to read the values.

    If I say..
    Yaml.load(new File(yamlFile));

    I am getting the folllowing exception.
    ------------------------------------------
    org.ho.yaml.YamlParserException: org.ho.yaml.YamlParserException: Error near line 7: yaml.parser.SyntaxException: no value after ':'
        at org.ho.yaml.YamlDecoder.readObject(Unknown Source)
        at org.ho.yaml.YamlConfig.load(Unknown Source)
        at org.ho.yaml.YamlConfig.load(Unknown Source)
        at org.ho.yaml.Yaml.load(Unknown Source)
    ---------------------------------------

    Please help me.....
    Thanks in advance.

    Regards,
    Rahul

    test.yaml is below
    ----------------------------------------------------------------------------------------
    #
    #   Company's Description and Copyright information
    #

    ### Mars
    Mars:
    -
      Name: test1
      LoginCr: test:test
      SLPDCr: SLPD:Rfhskhkhskdfh
      SPLicense: HGJHGGJJ
      SyncSPLicense: HGJHGGJJ
      SRLicense: HGJHGGJJ
      SRHost: myhost
      SRCols:
        - rmngtn:/rahul
        - rmngtn:/rahul2
      TestModProp:
        PMVal: host1
    -
      Name: vayu
      LoginCr: test:test
      SLPDCr: SLPD:Rfhskhkhskdfh
      SPLicense: UUNLDQC
      SyncSPLicense: IEOAOTB
      SVPriLicense: YAYCNCG
      SVPriHost: myprihost
      SVPriDirs:
        - myprihost:/rahul/A_st
        - myprihost:/rahul/B_st
      TestModProp:
        PMVal: host1
    ### End Mars
    ### Begin Caches
    Switch:
    -
      Name: testCache
      LoginCr: test:test
      TestModProp:
        SRMVal: host4
    ### End Caches