Question: I am looking for a good microphone to record a piano. This is whole new field to me. I looked in the Internet and I found a few places stating about what I shouldn't buy, like, dynamic range microphones.

What characteristics should I look for when picking a microphone (or set) to record a piano?

Would recording directly from a digital piano give me a better quality (although with less dynamics possibilities)?

Answer: 
Rather sadly, you'll probably get better results from a good digital piano than from microphones on a real one. Unless it's a really nice piano in a really good-sounding room. You'll have noticed I didn't say "and really good microphones". They matter, but not as much as you might imagine.

If you're after "classical" solo piano sound, record stereo. But remember, an audience normally sees a piano on a concert stage sideways on, from quite a distance. In this case "stereo" will be about placing the instrument in a reverberant space, not about "low notes to the left, high notes to the right". This is a mistake made by the sound sets of many digital pianos.

But you will probably not get the results you want from hiring a concert hall and putting a stereo pair in the best seat! You'll fake the stereo ambience from some combination of close and medium-distance micing, and artificial reverb.

I'll get shot down for this, but I've made some very pleasing acoustic piano recordings with a pair of Shure SM57 dynamic mics. And you may be in a position to try this, with no immediate expense! Do you live in a world of modern performing musicians? Grab a couple of SM58 mics, take the balls off - they become essentially SM57s. (Don't drop them though!).

If you have no gear at all, there's another approach. Buy a Zoom H4n or similar, put it on a stand in front of the piano. You'll be surprised how close the result is to a recording made through much more expensive gear. And even if you progress to more sophticated equipment, a good portable recorder is always useful.
I'd go for good omnidirectional small diaphragm condensor mics without excessive brightness in close proximity to the piano (which means that the effect of the polar characteristic capturing more of the room will be at best mildly relevant). The size of the piano means that cardiod microphones would have to be placed at considerably more of a distance in order to get a balanced sound quality without proximity effects and off-axis coloring (off-axis coloring becomes a mostly moot issue even with cardioids once you spring a few thousand dollars/euros for your mics but not everybody has that sort of small change).

Personally, I consider Oktavas a reasonable deal in that problem space. The somewhat more expensive equivalents from Røde I haven't tried (S55 I think?), but the frequency responses I see on paper are more brilliant than I care for for my use case of accordion, admittedly an instrument that is quite less appreciative of additional brilliancy than most pianos are.