我在Ubuntu 16.04上使用x3270.zOS没有一个好的编辑器,不得不编写大量的代码并修复它是一件痛苦的事.
我想在我的计算机上编写代码并将其复制到x3270窗口中.
有没有办法做到这一点?
我正在尝试针对XML文件验证JAXB模式,并且不断收到上述错误。您能告诉我<{} Quote>是什么意思吗?错误是从哪里来的?报价是从XSD文件创建的。是否因为未定义“引号”元素?这是我的代码。
package khoa;
import java.io.File;
import javax.xml.XMLConstants;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.ValidationEvent;
import javax.xml.bind.ValidationEventHandler;
import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;
import org.xml.sax.SAXException;
import khoa.Quote;
import khoa.Quotes;
public class EmployeeUnmarshaller {
public static void main(String[] args) throws JAXBException, SAXException {
new EmployeeUnmarshaller().runEmployeeUnmarshaller();
}
private void runEmployeeUnmarshaller() throws JAXBException, SAXException {
JAXBContext context = JAXBContext.newInstance(Quote.class);
SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
Schema schema = sf.newSchema(new File("quotes.xsd"));
Unmarshaller unmarshaller = context.createUnmarshaller();
unmarshaller.setSchema(schema);
unmarshaller.setEventHandler(new EmployeeValidationEventHandler());
System.out.println(unmarshaller.unmarshal(new File("quotes.xml")));
}
}
class EmployeeValidationEventHandler implements …Run Code Online (Sandbox Code Playgroud) 我正在尝试编写一个子程序来读取"grocery.txt"文件.格式如下:12 7.2橙色
第一列是整数,第二列是浮点数.第三个是字符串,直到行尾.我应该如何声明参数以及如何将文件变量作为子过程的参数传递?
PROCEDURE Read_File(Ada.Text_IO.File_Type => in_Item,
Item : out Grocery_Item) IS
BEGIN
Ada.Integer_Text_IO.Get(File => In_Item,
Item => Grocery_Item.Quantity,
Width => 3);
Ada.Float_Text_IO.Get(File => In_Item, Item => Grocery_Item.Cost_Per_Item,
Width => 3);
Ada.Text_IO.Get_Line(Item => Grocery_Item.Item.Item_Name,
Last => Grocery_Item.Item.Item_Name_Length);
END Read_File;
Run Code Online (Sandbox Code Playgroud)
我一直收到错误,说我在PROCEDURE线上错过了",".
非常感谢你.