users@jaxb.java.net

Re: control namespace-prefix

From: ivan <ivan_at_dhousestudio.com>
Date: Mon, 03 Nov 2008 11:53:04 +0200

Aleksei Valikov пишет:
> Hi.
>
>> I have some xsd-schema and generated classes.
>>
>> I work with object model and would to save it to xml-file.
>>
>> And namespace-prefix is added to tags.
>>
>> I would like to remove custom prefix from custom tags and use it only in the
>> parent tag. Example:
>>
>> Existing:
>>
>> <ns:mytag xmlns:ns="htpp://example.com">
>> <ns:mysubtag>
>> <ns:/mysubtag>
>> <ns:/mytag>
>>
>> Aim:
>>
>> <ns:mytag xmlns:ns="htpp://example.com">
>> <mysubtag>
>> </mysubtag>
>> <ns:/mytag>
>>
>>
>> How can I do it?
>
> https://jaxb.dev.java.net/guide/Changing_prefixes.html

Yes, I saw it, but I didn't find how to control namespace-prefix in
custom tags, not namespaces.
Two tags can have the same namespace, and it is needed to write prefix
in one tag, and do not write prefix in other tags.


Thanks,
Truly yours,
Ivan Pryvalov.

>
> Bye.
> /lexi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>