Binding 另一个Jaxb绑定问题

Binding 另一个Jaxb绑定问题,binding,jaxb,moxy,Binding,Jaxb,Moxy,我想我终于解决了我的一个问题。我正在使用Jaxb w/Moxy实现。我在绑定文件中使用Xpath表示法。我没有得到想要的结果 最初的jaxb生成的类是嵌套的,为了测试,我将代码精简为以下Condition.java Condition.java @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "condition", propOrder = { "diagnosisPriority", "pro

我想我终于解决了我的一个问题。我正在使用Jaxb w/Moxy实现。我在绑定文件中使用Xpath表示法。我没有得到想要的结果

最初的jaxb生成的类是嵌套的,为了测试,我将代码精简为以下Condition.java

Condition.java

 @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "condition", propOrder = {
        "diagnosisPriority",
        "problemDate",
        "problemType",
        "problemName",
        "problemCode",
        "ageAtOnset",
        "problemStatus",
        "comment"
    })

public  class Condition {

    protected BigInteger diagnosisPriority;
    protected IvlTs problemDate;
    protected Cd problemType;
    @XmlElement(required = true)
    protected Object problemName;
    protected Cd problemCode;
    protected BigInteger ageAtOnset;
    protected Ce problemStatus;
    protected List<Comment> comment;

//ommitted getters and setters
我的第一个测试是创建一个对象模型,并将其转换为xml。此操作已成功完成,代码如下:

public static void main(String[] args) {

    try {
      int AgeInt = 36;
      int DiagnoseInt = 5;
      Condition InstCon = new Condition();
      Cd myProblem = new Cd();
      InstCon.setDiagnosisPriority(BigInteger.valueOf(DiagnoseInt));
      InstCon.setProblemType(myProblem);
      InstCon.setProblemName("I have Asthma");
      InstCon.setAgeAtOnset(BigInteger.valueOf(AgeInt)); 
      myProblem.setCode("1223343");
      myProblem.setCodeSystem("23433.23232.23232");
      myProblem.setDisplayName("Asthma");
      myProblem.setCodeSystemName("ICD-9");

    JAXBContext jc1 = JAXBContext.newInstance(conditionConnect.class);
    Marshaller marshaller1 = jc1.createMarshaller();
    marshaller1.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
    conditionConnect conVar = new conditionConnect();
    conVar.setconditionConnect(InstCon);
    marshaller1.marshal(conVar, System.out);
输出是如此(成功!):


5.
我有哮喘
. 我已经研究并考虑了以下选择:

JPA(使用SAX/DOM-在中间映射中)、XML连接节点和XML适配器。我不完全清楚这些选项中的哪一个(如果有的话)对我的问题有帮助,非常感谢您的专家建议。

更新

在您的示例中,您使用
binding.xml
来控制编组的映射。在这个绑定文件中,您已经设置了
xml映射元数据complete=“true”
。这会向MOXy表明注释应该被忽略,并且绑定文件指定了完整的元数据。如果此标志设置为false或未指定,则使用绑定文件来增加注释

binding.xml

<xml-bindings
    xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
    package-name="hl7.astm.greenccd.org"
    xml-mapping-metadata-complete="true">  
 <java-types>  
   <java-type name="Condition" >
           <xml-root-element name="PROBLEM_MODULE"  /> 
           <xml-type prop-order="diagnosisPriority problemDate problemType problemName problemCode ageAtOnset problemStatus comment"/>
           <java-attributes>
           <xml-element java-attribute="diagnosisPriority" xml-path="ID/text()" />
           <xml-element java-attribute="problemDate"  />
           <xml-element java-attribute="problemType" name="PROBLEM_TYPE" type="Cd"/>        
           <xml-element java-attribute="problemName"  />
           <xml-element java-attribute="problemCode"  />
           <xml-element java-attribute="ageAtOnset" xml-path="PCM_TREATING_PROVIDER_ID/text()" />
           <xml-element java-attribute="problemStatus" />
           <xml-element java-attribute="comment"  />
           </java-attributes>
            </java-type>

        <java-type name="Cd">
            <xml-type prop-order="code codeSystem displayName codeSystemName"/>
            <java-attributes>
                <xml-attribute java-attribute="code" xml-path="PR_ID/text()"/>
                <xml-attribute java-attribute="codeSystem" xml-path="PROBLEM_CODE/text()"/>
                <xml-attribute java-attribute="displayName" xml-path="PROBLEM_NAME/text()"/>
                <xml-attribute java-attribute="codeSystemName" xml-path="PCM_PROBLEM_CS/text()"/>
            </java-attributes>
        </java-type>
    </java-types>
</xml-bindings>
<?xml version="1.0" encoding="UTF-8"?>
<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
    package-name="hl7.astm.greenccd.org" xml-mapping-metadata-complete="true">
    <java-types>
        <java-type name="Condition">
            <xml-root-element name="PROBLEM_MODULE" />
            <xml-type
                prop-order="diagnosisPriority problemDate problemType problemName problemCode ageAtOnset problemStatus comment" />
            <java-attributes>
                <xml-element java-attribute="diagnosisPriority"
                    xml-path="ID/text()" />
                <xml-element java-attribute="problemDate" />
                <xml-element java-attribute="problemType" name="PROBLEM_TYPE"
                    xml-path="." />
                <xml-element java-attribute="problemName" />
                <xml-element java-attribute="problemCode" />
                <xml-element java-attribute="ageAtOnset" name="PCM_TREATING_PROVIDER_ID" />
                <xml-element java-attribute="problemStatus" />
                <xml-element java-attribute="comment" />
            </java-attributes>
        </java-type>

        <java-type name="Cd">
            <xml-type prop-order="code codeSystem displayName codeSystemName" />
            <java-attributes>
                <xml-attribute java-attribute="code" name="PR_ID" />
                <xml-attribute java-attribute="codeSystem" name="PROBLEM_CODE" />
                <xml-attribute java-attribute="displayName" name="PROBLEM_NAME" />
                <xml-attribute java-attribute="codeSystemName" name="PCM_PROBLEM_CS" />
            </java-attributes>
        </java-type>
    </java-types>
</xml-bindings>
<?xml version="1.0" encoding="UTF-8"?>
<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
    package-name="hl7.astm.greenccd.org" xml-mapping-metadata-complete="true">
    <java-types>
        <java-type name="Condition">
            <xml-root-element name="PROBLEM_MODULE" />
            <xml-type
                prop-order="diagnosisPriority problemDate problemType problemName problemCode ageAtOnset problemStatus comment" />
            <java-attributes>
                <xml-element java-attribute="diagnosisPriority"
                    xml-path="ID/text()" />
                <xml-element java-attribute="problemDate" />
                <xml-element java-attribute="problemType" name="PROBLEM_TYPE"
                    xml-path="." />
                <xml-element java-attribute="problemName" />
                <xml-element java-attribute="problemCode" />
                <xml-element java-attribute="ageAtOnset" name="PCM_TREATING_PROVIDER_ID" />
                <xml-element java-attribute="problemStatus" />
                <xml-element java-attribute="comment" />
            </java-attributes>
        </java-type>

        <java-type name="Cd">
            <xml-type prop-order="code codeSystem displayName codeSystemName" />
            <java-attributes>
                <xml-element java-attribute="code" name="PR_ID" />
                <xml-element java-attribute="codeSystem" name="PROBLEM_CODE" />
                <xml-element java-attribute="displayName" name="PROBLEM_NAME" />
                <xml-element java-attribute="codeSystemName" name="PCM_PROBLEM_CS" />
            </java-attributes>
        </java-type>
    </java-types>
</xml-bindings>
下面我已经删除了
xml映射元数据complete=“true”


更新

在您的示例中,您使用
binding.xml
来控制编组的映射。在这个绑定文件中,您已经设置了
xml映射元数据complete=“true”
。这会向MOXy表明注释应该被忽略,并且绑定文件指定了完整的元数据。如果此标志设置为false或未指定,则使用绑定文件来增加注释

binding.xml

<xml-bindings
    xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
    package-name="hl7.astm.greenccd.org"
    xml-mapping-metadata-complete="true">  
 <java-types>  
   <java-type name="Condition" >
           <xml-root-element name="PROBLEM_MODULE"  /> 
           <xml-type prop-order="diagnosisPriority problemDate problemType problemName problemCode ageAtOnset problemStatus comment"/>
           <java-attributes>
           <xml-element java-attribute="diagnosisPriority" xml-path="ID/text()" />
           <xml-element java-attribute="problemDate"  />
           <xml-element java-attribute="problemType" name="PROBLEM_TYPE" type="Cd"/>        
           <xml-element java-attribute="problemName"  />
           <xml-element java-attribute="problemCode"  />
           <xml-element java-attribute="ageAtOnset" xml-path="PCM_TREATING_PROVIDER_ID/text()" />
           <xml-element java-attribute="problemStatus" />
           <xml-element java-attribute="comment"  />
           </java-attributes>
            </java-type>

        <java-type name="Cd">
            <xml-type prop-order="code codeSystem displayName codeSystemName"/>
            <java-attributes>
                <xml-attribute java-attribute="code" xml-path="PR_ID/text()"/>
                <xml-attribute java-attribute="codeSystem" xml-path="PROBLEM_CODE/text()"/>
                <xml-attribute java-attribute="displayName" xml-path="PROBLEM_NAME/text()"/>
                <xml-attribute java-attribute="codeSystemName" xml-path="PCM_PROBLEM_CS/text()"/>
            </java-attributes>
        </java-type>
    </java-types>
</xml-bindings>
<?xml version="1.0" encoding="UTF-8"?>
<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
    package-name="hl7.astm.greenccd.org" xml-mapping-metadata-complete="true">
    <java-types>
        <java-type name="Condition">
            <xml-root-element name="PROBLEM_MODULE" />
            <xml-type
                prop-order="diagnosisPriority problemDate problemType problemName problemCode ageAtOnset problemStatus comment" />
            <java-attributes>
                <xml-element java-attribute="diagnosisPriority"
                    xml-path="ID/text()" />
                <xml-element java-attribute="problemDate" />
                <xml-element java-attribute="problemType" name="PROBLEM_TYPE"
                    xml-path="." />
                <xml-element java-attribute="problemName" />
                <xml-element java-attribute="problemCode" />
                <xml-element java-attribute="ageAtOnset" name="PCM_TREATING_PROVIDER_ID" />
                <xml-element java-attribute="problemStatus" />
                <xml-element java-attribute="comment" />
            </java-attributes>
        </java-type>

        <java-type name="Cd">
            <xml-type prop-order="code codeSystem displayName codeSystemName" />
            <java-attributes>
                <xml-attribute java-attribute="code" name="PR_ID" />
                <xml-attribute java-attribute="codeSystem" name="PROBLEM_CODE" />
                <xml-attribute java-attribute="displayName" name="PROBLEM_NAME" />
                <xml-attribute java-attribute="codeSystemName" name="PCM_PROBLEM_CS" />
            </java-attributes>
        </java-type>
    </java-types>
</xml-bindings>
<?xml version="1.0" encoding="UTF-8"?>
<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
    package-name="hl7.astm.greenccd.org" xml-mapping-metadata-complete="true">
    <java-types>
        <java-type name="Condition">
            <xml-root-element name="PROBLEM_MODULE" />
            <xml-type
                prop-order="diagnosisPriority problemDate problemType problemName problemCode ageAtOnset problemStatus comment" />
            <java-attributes>
                <xml-element java-attribute="diagnosisPriority"
                    xml-path="ID/text()" />
                <xml-element java-attribute="problemDate" />
                <xml-element java-attribute="problemType" name="PROBLEM_TYPE"
                    xml-path="." />
                <xml-element java-attribute="problemName" />
                <xml-element java-attribute="problemCode" />
                <xml-element java-attribute="ageAtOnset" name="PCM_TREATING_PROVIDER_ID" />
                <xml-element java-attribute="problemStatus" />
                <xml-element java-attribute="comment" />
            </java-attributes>
        </java-type>

        <java-type name="Cd">
            <xml-type prop-order="code codeSystem displayName codeSystemName" />
            <java-attributes>
                <xml-element java-attribute="code" name="PR_ID" />
                <xml-element java-attribute="codeSystem" name="PROBLEM_CODE" />
                <xml-element java-attribute="displayName" name="PROBLEM_NAME" />
                <xml-element java-attribute="codeSystemName" name="PCM_PROBLEM_CS" />
            </java-attributes>
        </java-type>
    </java-types>
</xml-bindings>
下面我已经删除了
xml映射元数据complete=“true”


您好,能否提供problems.xml中的元素对应于哪些字段/属性的其他详细信息?您还可以提供
binding.xml
?您好,我编辑了上面的帖子,添加了字段/属性匹配以及进一步的解释。请告知我需要进一步澄清的地方。非常感谢。您好,您能提供一些关于problems.xml中的元素对应于哪些字段/属性的其他详细信息吗?您还可以提供
binding.xml
?您好,我编辑了上面的帖子,添加了字段/属性匹配以及进一步的解释。请告知我需要进一步澄清的地方。非常感谢,谢谢!我将conditionsBinding.xml更改为上面的代码,在运行项目后生成了完全相同的xml。但是,我需要problemType(code、codeSystem、displayName、codeSystemName)作为problemType的属性。在conditionBinding.xml中的java类型Cd下,我将xml元素更改为xml属性。进行更改后,元素problemType作为空标记出现,没有属性。请参阅我上面文章中的其他编辑。@Hjones-我仍然不确定您的用例是否正确。基于您的代码,我的假设是您正在使用
conditionsBinding.xml
映射到
problems.xml
,这就是我在回答中提供的。当您说“我需要problemType(code、codeSystem、displayName、codeSystemName)作为属性输入”时,您是在尝试解组另一个文档,还是在谈论封送员?如果您谈论的是封送处理,那么您的示例将使用
binding.xml
ant这是我们需要调整的映射。当谈到“我需要problemType(code、codeSystem、displayName、codeSystemName)作为属性进来”时->在本例中,我谈论的是封送处理。我需要如何更改binding.xml?谢谢!我将conditionsBinding.xml更改为上面的代码,在运行项目后生成了完全相同的xml。但是,我需要problemType(code、codeSystem、displayName、codeSystemName)作为problemType的属性。在conditionBinding.xml中的java类型Cd下,我将xml元素更改为xml属性。进行更改后,元素problemType作为空标记出现,没有属性。请参阅我上面文章中的其他编辑。@Hjones-我仍然不确定您的用例是否正确。基于您的代码,我的假设是您正在使用
conditionsBinding.xml
映射到
problems.xml
,这就是我在回答中提供的。当您说“我需要problemType(code、codeSystem、displayName、codeSystemName)作为属性输入”时,您是在尝试解组另一个文档,还是在谈论封送员?如果您谈论的是封送处理,那么您的示例将使用
binding.xml
ant这是我们需要调整的映射。当谈到“我需要problemType(code、codeSystem、displayName、codeSystemName)作为属性进来”时->在本例中,我谈论的是封送处理。我需要如何更改binding.xml?
<problemType/>
<problemType code="1223343" displayName="Asthma" codeSystem="23433.23232.23232" codeSystemName="ICD-9"/>
<xml-bindings
xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
package-name="hl7.astm.greenccd.org" 
xml-mapping-metadata-complete="true">
<java-types>
    <java-type name="Condition" xml-accessor-type="FIELD">
        <xml-root-element name="Condition"/>
    </java-type>
  <java-type name="Cd" xml-accessor-type="FIELD">
        <xml-root-element name="problemType"/>
    </java-type>
</java-types>
</xml-bindings>
public static void main(String[] args) {

        try {

    Map<String, Object> properties = new HashMap<String, Object>(1);
    properties.put(JAXBContextFactory.ECLIPSELINK_OXM_XML_KEY, new File("src/conditions/exec/conditionsBinding.xml"));
         JAXBContext jc = JAXBContext.newInstance(new Class[] {Condition.class, Cd.class}, properties);

        // create an Unmarshaller
        Unmarshaller u = jc.createUnmarshaller();
        Condition conditionInput = (Condition) u.unmarshal( 
                   new File("src/conditions/exec/problems.xml")); 


    Marshaller resultMarshaller = jc.createMarshaller();
    resultMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
    resultMarshaller.marshal(conditionInput, System.out); 



    } catch (JAXBException je) {
        je.printStackTrace();
    } 


}  
<?xml version="1.0" encoding="UTF-8"?> 
<PROBLEM_MODULE>    
 <ID>91</ID>
 <PROBLEM_TYPE/>    
 <TREATING_PROVIDER_ID>23456</TREATING_PROVIDER_ID>
</PROBLEM_MODULE>
<PROBLEM_MODULE>
  <ID>91</ID> /* maps to class Condition: diagnosisPriority */
  <PR_ID>124</PR_ID> /* maps to class Cd: code */
  <PROBLEM_TYPE>T</PROBLEM_TYPE> /* class Condition: problemType - problemType is of type Cd.java - Cd.java is a list of attributes only
  <PROBLEM_NAME>Asthma</PROBLEM_NAME> /* maps to class Cd: displayName*/
  <PROBLEM_CODE>244.9</PROBLEM_CODE>/* maps to class Cd: codeSystem*/
  <PATIENT_AWARENESS>N</PATIENT_AWARENESS>
  <TREATING_PROVIDER_ID>23456</TREATING_PROVIDER_ID> /* maps to Condition: ageAtOnset */
  <PROBLEM_CS>ICD9</PCM_PROBLEM_CS> /* maps to class Cd: codeSystemName*/
 </PROBLEM_MODULE>
<PROBLEM_TYPE>T</PROBLEM_TYPE> /* class Condition: problemType - problemType is of type Cd.java - Cd.java is a list of attributes only
<xml-element java-attribute="problemType" name="PROBLEM_TYPE" type="Cd"/>
<xml-element java-attribute="problemType" type="Cd"/>
<?xml version="1.0" encoding="UTF-8"?>
<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
    package-name="hl7.astm.greenccd.org" xml-mapping-metadata-complete="true">
    <java-types>
        <java-type name="Condition">
            <xml-root-element name="PROBLEM_MODULE" />
            <xml-type
                prop-order="diagnosisPriority problemDate problemType problemName problemCode ageAtOnset problemStatus comment" />
            <java-attributes>
                <xml-element java-attribute="diagnosisPriority"
                    xml-path="ID/text()" />
                <xml-element java-attribute="problemDate" />
                <xml-element java-attribute="problemType" name="PROBLEM_TYPE"
                    xml-path="." />
                <xml-element java-attribute="problemName" />
                <xml-element java-attribute="problemCode" />
                <xml-element java-attribute="ageAtOnset" name="PCM_TREATING_PROVIDER_ID" />
                <xml-element java-attribute="problemStatus" />
                <xml-element java-attribute="comment" />
            </java-attributes>
        </java-type>

        <java-type name="Cd">
            <xml-type prop-order="code codeSystem displayName codeSystemName" />
            <java-attributes>
                <xml-attribute java-attribute="code" name="PR_ID" />
                <xml-attribute java-attribute="codeSystem" name="PROBLEM_CODE" />
                <xml-attribute java-attribute="displayName" name="PROBLEM_NAME" />
                <xml-attribute java-attribute="codeSystemName" name="PCM_PROBLEM_CS" />
            </java-attributes>
        </java-type>
    </java-types>
</xml-bindings>
<?xml version="1.0" encoding="UTF-8"?>
<Condition>
   <diagnosisPriority>91</diagnosisPriority>
   <problemType />
   <ageAtOnset>23456</ageAtOnset>
</Condition>
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "cd", propOrder = {
    "originalText",
    "qualifier"
})

public class Cd {

    protected Object originalText;
    protected List<Qualifier> qualifier;

    @XmlAttribute(name = "code")
    @XmlSchemaType(name = "anySimpleType")
    protected String code;

    @XmlAttribute(name = "displayName")
    @XmlSchemaType(name = "anySimpleType")
    protected String displayName;

    @XmlAttribute(name = "codeSystem")
    @XmlSchemaType(name = "anySimpleType")
    protected String codeSystem;

    @XmlAttribute(name = "codeSystemName")
    @XmlSchemaType(name = "anySimpleType")
    protected String codeSystemName;

    @XmlAttribute(name = "nullFlavor")
    protected NullFlavorType nullFlavor;
<?xml version="1.0" encoding="UTF-8"?>
<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
    package-name="hl7.astm.greenccd.org" xml-mapping-metadata-complete="true">
    <java-types>
        <java-type name="Condition">
            <xml-root-element name="PROBLEM_MODULE" />
            <xml-type
                prop-order="diagnosisPriority problemDate problemType problemName problemCode ageAtOnset problemStatus comment" />
            <java-attributes>
                <xml-element java-attribute="diagnosisPriority"
                    xml-path="ID/text()" />
                <xml-element java-attribute="problemDate" />
                <xml-element java-attribute="problemType" name="PROBLEM_TYPE"
                    xml-path="." />
                <xml-element java-attribute="problemName" />
                <xml-element java-attribute="problemCode" name="PROBLEM_CODE_PSEUDO"
                    xml-path="."/>
                <xml-element java-attribute="ageAtOnset" name="PCM_TREATING_PROVIDER_ID" />
                <xml-element java-attribute="problemStatus" />
                <xml-element java-attribute="comment" />
            </java-attributes>
        </java-type>
    <java-type name="Cd">
        <xml-type prop-order="code codeSystem displayName codeSystemName" />
        <java-attributes>
            <xml-element java-attribute="code" name="PR_ID" />
            <xml-element java-attribute="codeSystem" name="PROBLEM_CODE" />
            <xml-element java-attribute="displayName" name="PROBLEM_NAME" />
            <xml-element java-attribute="codeSystemName" name="PCM_PROBLEM_CS" />
        </java-attributes>
    </java-type>
     /* java-type name = Cd will be mapped to different xml elements for problemCode */
    <java-type name="Cd">
        <xml-type prop-order="code codeSystem displayName codeSystemName" />
        <java-attributes>
            <xml-element java-attribute="code" name="PR_ID_PSEUDO" />
            <xml-element java-attribute="codeSystem" name="PROBLEM_CODE_PSEUDO" />
            <xml-element java-attribute="displayName" name="PROBLEM_NAME_PSEUDO" />
            <xml-element java-attribute="codeSystemName" name="PCM_PROBLEM_CS_PSEUDO" />
        </java-attributes>
    </java-type>

</java-types>
<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
    package-name="hl7.astm.greenccd.org">
    <java-types>
        <java-type name="Condition" xml-accessor-type="FIELD">
            <xml-root-element name="Condition" />
        </java-type>
        <java-type name="Cd" xml-accessor-type="FIELD">
            <xml-root-element name="problemType" />
        </java-type>
    </java-types>
</xml-bindings>
<?xml version="1.0" encoding="UTF-8"?>
<Condition>
   <diagnosisPriority>91</diagnosisPriority>
   <problemType code="124" displayName="Asthma" codeSystem="244.9" codeSystemName="ICD9"/>
</Condition>
<?xml version="1.0" encoding="UTF-8"?>
<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
    package-name="hl7.astm.greenccd.org" xml-mapping-metadata-complete="true">
    <java-types>
        <java-type name="Condition">
            <xml-root-element name="PROBLEM_MODULE" />
            <xml-type
                prop-order="diagnosisPriority problemDate problemType problemName problemCode ageAtOnset problemStatus comment" />
            <java-attributes>
                <xml-element java-attribute="diagnosisPriority"
                    xml-path="ID/text()" />
                <xml-element java-attribute="problemDate" />
                <xml-element java-attribute="problemType" name="PROBLEM_TYPE"
                    xml-path="." />
                <xml-element java-attribute="problemName" />
                <xml-element java-attribute="problemCode" />
                <xml-element java-attribute="ageAtOnset" name="PCM_TREATING_PROVIDER_ID" />
                <xml-element java-attribute="problemStatus" />
                <xml-element java-attribute="comment" />
            </java-attributes>
        </java-type>

        <java-type name="Cd">
            <xml-type prop-order="code codeSystem displayName codeSystemName" />
            <java-attributes>
                <xml-element java-attribute="code" name="PR_ID" />
                <xml-element java-attribute="codeSystem" name="PROBLEM_CODE" />
                <xml-element java-attribute="displayName" name="PROBLEM_NAME" />
                <xml-element java-attribute="codeSystemName" name="PCM_PROBLEM_CS" />
            </java-attributes>
        </java-type>
    </java-types>
</xml-bindings>
<?xml version="1.0" encoding="UTF-8"?>
<Condition>
   <diagnosisPriority>91</diagnosisPriority>
   <problemType>
      <code>124</code>
      <codeSystem>244.9</codeSystem>
      <displayName>Asthma</displayName>
      <codeSystemName>ICD9</codeSystemName>
   </problemType>
</Condition>