Skip to content

Unwanted blank namespace appearing in list child element tag #252

Answered by pdvrieze
alucasa asked this question in Q&A
Discussion options

You must be logged in to vote

I think you are confused as to how it works. In your example you declare that HouseCreationRequest lives in the "http://mynamespace.com" namespace with the default prefix. The xmlns namespace declaration just specifies the prefix/namespace mapping. All tags have a namespace, based on the prefix of the element (also if empty). So House, Location, FloorDetails, FloorDetail, Bathrooms and Bathroom are all in that namespace, but because you use the default namespace this is not possible. The bug with @XmlChildrenName is that instead of inheriting the namespace it uses the empty namespace. That is the reason you see the xmlns="" attribute on FloorDetail because it is now in the default/empty n…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@alucasa
Comment options

@pdvrieze
Comment options

Answer selected by alucasa
@alucasa
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants