我使用dom4j在线解析XML文件。
File file = new File("text.xml");
SAXReader reader = new SAXReader();
Document document = reader.read(file);
在一些XML文件中存在语法错误,这使得程序将SAXParseException: The prefix X for element X:A is not bound抛到reader.read(file)行。
我知道错误是什么,以及如何使XML文件正确。就像里说的那样
但问题是XML文件是由用户上传的,解析前不能更改文件,也不能
分布式智能契约的基本问题。让我们假设一下,我正在编写一份智能合同,并将其部署到公共网络中。
My Contract Specification
• My contract would allow anyone to register.
• Fund 10 Ether to the contract
• Contract will in turn return 12 Ether on Dec 31st 2017
合同所有者错误地没有将其限制在12月31日,而是在合同中提到了1月31日。
场景:
• Owner A sits in USA, deploys the contra