JAXB namespace prefixes missing

后端 未结 3 473
死守一世寂寞
死守一世寂寞 2020-12-05 00:02

I have generated Java classes from XSD, all works fine from a unmarshalling point of view.

However, when I marshall from JAXB classes I get the following:

         


        
3条回答
  •  一向
    一向 (楼主)
    2020-12-05 00:49

    According to XML spec both xml's are the same, as xmlns="" defines default namespace which applies to current and all child elements. XML parsers should give you the same DOM or SAX in both cases

提交回复
热议问题