我的JAXB有一个问题
<element name="create">
<complexType>
<sequence>
<element name="name" type="string"></element>
</sequence>
</complexType>
</element>
Run Code Online (Sandbox Code Playgroud)
我的xml:
<Create>
<name> coco </name>
</Create>
Run Code Online (Sandbox Code Playgroud)
我的代码java:
JAXBContext context = JAXBContext.newInstance("MyPackage");
Unmarshaller decodeur = context.createUnmarshaller();
System.out.println("text : " + message);
msgObject = decodeur.unmarshal(sr);
if (msgObject instanceof Create)
{
System.out.println(" action");
}
Run Code Online (Sandbox Code Playgroud)
我有这个:
意外元素(uri:"",local:"Create").预期的元素是<{ http://www.example.org/XSD_Maths } create>
我的代码停止了这个:
msgObject = decodeur.unmarshal(sr);
Run Code Online (Sandbox Code Playgroud)
我的xml好吗?你能帮帮我吗,因为我不知道是什么问题
我有一张图片,我想调整它的大小。
应用脚本代码:
var fileId = 'idImage';
var img = DriveApp.getFileById(fileId).getBlob().;
newFile.getBody().insertImage(0, img);
Run Code Online (Sandbox Code Playgroud)
对象Blob无法调整大小,因此如何调整图像大小?
问候
我有一个演员的概率
JAXBElement<User> jaxbElement = (JAXBElement<User>)unmarshaller.unmarshal(sr);
Run Code Online (Sandbox Code Playgroud)
它不起作用,eveybody可以帮助我吗?
我不能这样做:我告诉你我的代码:
StringReader sr = new StringReader(this.message);
JAXBElement<Utilisateur> jaxbElement = (JAXBElement<Utilisateur>) unmarshaller.unmarshal(sr);
Run Code Online (Sandbox Code Playgroud)
如果我这样做,我有一个错误,因为我使用StringReader:
JAXBElement<User> jaxbElement = unmarshaller.unmarshal(sr, User.class);
Run Code Online (Sandbox Code Playgroud)