One big way to tell a difference is that DNA is double stranded, in the shape of a double helix, while RNA is single stranded. (This is why RNA can leave the nucleus and DNA cannot) There are also factors that affect the difference like how DNA contains thymine, and when RNA makes copies of it, it becomes uracil.
HCL in the lumen doesn't digest the mucous because goblet cells in the mucous secrete large quantities of protective mucus that line the mucous surface.
In simple terms, our stomach has enzymes which allow it to be protected against the hydrochloride acid.