Hi,
I have a DTD schema that is defined as:
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT application (request | response)>
<!ELEMENT request (#PCDATA | field)*>
<!ELEMENT field (#PCDATA)>
<!ATTLIST field
name CDATA #REQUIRED
>
<!ELEMENT response (number? | record* | error?)>
<!ELEMENT number (#PCDATA)>
<!ELEMENT record (field)+>
<!ELEMENT error (#PCDATA)>
I want to generate the following xml for example:
<application>
<request>cmd -i 1 -p 1 -s -a
<field name="phone">255685082753</field>
<field name="username">user</field>
</request>
</application>
However I'm having trouble dealing with the element: <!ELEMENT request
(#PCDATA | field)*>
because the signature of the request.setValue is:
public void setvalue(String value) {
this.value = value;
}
How can I set its value to both a PCDATA and multiple fields?
Thanks,
--
View this message in context: http://old.nabble.com/DTD-generation-of-%28-PCDATA-%7C-field%29*-tp28916598p28916598.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.