将 xml 持续时间 ex P0DT1H0M0S 转换为 java
嗨,我正在尝试将 xml 持续时间读取为新的持续时间,但我没有说 “无法实例化类型 Duration”
我对 java 和 android 开发很陌生。所以请保留任何非建设性的评论。
代码
import javax.xml.datatype.Duration;
Duration duration = new Duration();
Hi i'm trying to read xml duration to a new duration but i't says
"Cannot instantiate the type Duration"
I'm quite new to java and android dev. so please keep any nonconstructive comments to yourself..
the code
import javax.xml.datatype.Duration;
Duration duration = new Duration();
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我自己找到的。
编辑..
由于 DatatypeFactory 错误,上述内容是不可能的,所以我构建了这个类来自己修复它。
Found it myself.
Edit..
The above is not possible due to a DatatypeFactory bug sooo i built this class to fix it myself..