Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Reading strings from a yml file

  1. #1
    Junior Member
    Join Date
    May 2014
    Posts
    2
    My Mood
    Goofy
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Reading strings from a yml file

    I'm setting data to a yml file, then later going to display that data onto my application. The only problem I have is, I don't have a clue on how to read yml files.

    I'm going to be setting data as:

    coins: 100
    gold: 10
    etc...
    Then, I'd like to get the lines number or setting:

    coins: "100"
    gold: "10"
    hello-message: "hello"
    Is there any "somewhat" easy way to do this?


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,332
    Thanks
    49
    Thanked 2,194 Times in 2,167 Posts

    Default Re: Reading strings from a yml file

    What have you tried?
    Basically: read the file, parse the line, extract the data
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Reading from one file and write certain strings to another file
    By Herblore in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: April 19th, 2014, 03:32 AM
  2. Reading only first name from strings
    By fahman_khan75@yahoo.com in forum What's Wrong With My Code?
    Replies: 2
    Last Post: February 13th, 2014, 02:39 AM
  3. PrintStream, strings and reading from a file.
    By taze in forum What's Wrong With My Code?
    Replies: 13
    Last Post: November 1st, 2013, 08:50 PM
  4. Having problem to stop reading strings
    By scsa316 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: October 18th, 2011, 10:24 AM
  5. reading content of the text file, splitting it into strings
    By Dodo in forum File I/O & Other I/O Streams
    Replies: 7
    Last Post: January 6th, 2011, 06:57 PM

Tags for this Thread