有没有办法避免或设置模式来显示更好的用户友好消息?
我正在解析字符串并使用 reg ex 来解释它们,但可能有更好的方法。
前任。
"cvc-complex-type.2.4.b: The content of element 'node' is not complete. One of '{\"\":offer,\"\":links}' is expected."
相反,我想要:
"The element 'node' is not complete. The child elements 'offer' and 'links' are expected."
同样,我通过创建一个额外的层来验证它解决了这个问题。但是当我必须使用带有模式验证的 XML 工具时,显示的是 crypt 消息。
谢谢