【AXIS2]字符串转换为OMElement的问题

dsk22657 2009-04-28 02:20:07
在axis2中,字符串怎么能转化为OMElement呢?
...全文
459 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
newskyLCX_108 2009-07-02
  • 打赏
  • 举报
回复
public static OMElement toOMElement(String xmlStr, String encoding) {
OMElement xmlValue;
try {
xmlValue = new StAXOMBuilder(new ByteArrayInputStream(xmlStr
.getBytes(encoding))).getDocumentElement();
return xmlValue;
} catch (Exception e) {
return null;
}
}

其中参数xmlStr 字符串 例如<ppp>aaa</ppp> encoding 字符编码 例如utf-8
dsk22657 2009-04-29
  • 打赏
  • 举报
回复
顶下,有人知道吗?

67,512

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧