I suspect that if either the Allies or Germany saw a sure path to victory by conquering Denmark, it would have happened. For Germany, it had to have been advantageous to have Denmark as a neutral neighbor. For the Allies, control of Denmark would have given them access to the Baltic and that would have been very helpful.
Although, I must say that an Allied attack on Denmark would not have played well at all in the United States and the British were not unaware of the importance of public relations. So, while I don't question Denmark's general readiness and resolve, she was not a Great Power and could not have held of a Great Power determined to win.