This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

QName to string w/ prefix

 
Theodore David Williams
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I cannot seem to find a standard way to get a QName as a string with the prefix as output after mashaling to XML.

I.E. when I marshal to XML I get


Is there a standard way to turn a QName into this string?

Of course I could do:

QName qName = .....
String withPrefix = qName.getPrefix() + ":" + qName.getLocalName();


But that seems messy.
 
g tsuji
Ranch Hand
Posts: 656
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But that seems messy.

Maybe not that messy after all. Messiness is not of short supply, but that is far from being one, no? On the flip-side, one should guard against unnecessary proliferation of methods...
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic