ivan пишет:
> 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.
I've already fixed it.
The possible solution is to edit corresponding generated classes by
replacing
@XmlElement(name = "mysubtag", namespace = "
http://example.com",
required = true)
with
@XmlElement(name = "mysubtag", namespace = "", required = true)
Thanks,
Truly yours,
Ivan Pryvalov.
>
>
> 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
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>