Uploaded image for project: 'XMLBeans'
  1. XMLBeans
  2. XMLBEANS-288

Doubled wrapper elements around XMLBeans-generated XML

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • Version 2.1
    • None
    • Binding, Compiler, DOM, XmlObject
    • None
    • Windows XP, Apache Axis2 Nightly build

    Description

      This issue is a copy and slight restatement of AXIS2-1129, copied here because it apparently is an XMLBeans problem which has little to do with AXIS2 per se. Please consult AXIS2-1129 to see some of the analysis history and discussion of this bug, as well as a proposed workaround.

      The essence of this bug is that the following code (consisting of a generated Foo type parsed from an XML schema, and a generated FooDocument type which represents an XML document whose top-level element is a Foo instance):

      Foo foo = Foo.Factory.parse("<foo>Stuff</foo>")
      FooDocument fooDocument = FooDocument.Factory.newInstance();
      fooDocument.setFoo(foo);
      System.out.println(fooDocument.toString());

      that the output of this is similar to this:

      <foo><foo>Stuff</foo><foo>

      when it should be this:

      <foo>Stuff</foo>

      Also note that the workaround proposed in AXIS2-1129 by Dims seems to involve having to modify the XML schema to use qualified references to access various parts of itself, in ways that should be totally invisible to any standards-abiding XML schema parser. (It should make no difference if the schema uses qualified references or not if the meaning is unchanged) which might possibly indicate another bug.

      Attachments

        Activity

          People

            radup Radu Preotiuc
            derekfoster Derek Foster
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: