xml 标签类型怎么表示
XML code: <operation_out type="struct"> <service_name type="string">cc_verify</service_name> </operation_out> 用的是jdom,正常结构都会拼,关键是 type ,用什么方法呢?element.?
不明白?你需要一个属性来表示“类型” Element root = new Element("operation_in").setAttribute("type", "struct"); 这么写对不?引用 Element root = new Element("operation_in").setAttribute("type", "struct"); 这么写对不? 设置属性? 结贴结早了~~~还有个问题 Java code: content.addContent(new CDATA("<?xml version='1.0' encoding='GBK'?><request type='struct'>"+ "<home_city type='int'>"+homeCity+"</home_city><msisdn type='string'>"+phoneNO+"</msisdn></request>")); 问题是 new CDATA后面能不能写成Java code: request.addContent(home_city); request.addContent(msisd
相关问答:
已知文件1.xml和数据文件db.xml,如何用java编写程序,得出2.xml文件? 1.已知xml文件 1.xml结构如下: <cs> <cs name="cs1" details="This is cs1" country="China&q ......
我在编写一个wince5.0的程序,想实现把PDA上的一个LIST <STRING>类型的数据序列化为XML,然后在PC上的一个webservice拿到这个XML,转化为Dataset,更新PC上的数据库,我想问怎么把XML传给webservice的呢? ......
我有一个XML.想取 <Portfolio _Name="XXXX" _Id="AUD" > 中的属性_Id的值.但是用下面的语句好象不行. XmlNode CId = xdoc_Msg.SelectSingleNode("/Portfolio"); &n ......
<html> <head><title></title></head> <body> <iframe id="myifr"> <xml version="1.0" encoding="UTF-8" standalone="yes&q ......
XML code: <?php $XMLstr="<DMResponse><Code>1</Code><Description>Your request was successfully received and processed.</Description><ResultData><Explan ......