title: how can i change a yang model into a xml or json file，when there is a union type element?
body: <p>'''
      i want to change a yang model into xml, but there is a union type in yang model, and the odl check there is a error in the xml, i don`t known how to solve it 
  '''</p>
  
  <p>'''
      the part of yang model</p>
  
  <pre><code> leaf prefix {
         type leafref {
            path "../config/prefix";
         }
         description
         "Reference to the configured prefix for this aggregate";
    }
  
    typedef ip-prefix {
      type union {
        type ipv4-prefix;
        type ipv6-prefix;
      }
      description
        "An IPv4 or IPv6 prefix.";
    }
  </code></pre>
  
  <p>'''
  '''
      the part of xml</p>
  
  <pre><code>&lt;prefix&gt;10.0.0.0/24&lt;/prefix&gt;
  </code></pre>
  
  <p>'''
  '''
      the error msg</p>
  
  <pre><code>&lt;errors xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf"&gt;
      &lt;error&gt;
          &lt;error-type&gt;protocol&lt;/error-type&gt;
          &lt;error-tag&gt;malformed-message&lt;/error-tag&gt;
          &lt;error-message&gt;Error parsing input: Invalid value ""10.0.0.0/24"" for union type.&lt;/error-message&gt;
          &lt;error-info&gt;Invalid value ""10.0.0.0/24"" for union type.&lt;/error-info&gt;
      &lt;/error&gt;
  &lt;/errors&gt;
  </code></pre>
  
  <p>'''</p>