The first sentence can be paraphrased 'She wants something' which tells me that the infinitive acts as a noun. Can someone explain in detail how to categorise 'to marry' in the second sentence. Does it still act as a noun and if so, why?
She wants to marry.
She wants to marry him.