Results 1 to 2 of 2
  1. #1
    akbar4ums is offline Member
    Join Date
    Dec 2008
    Posts
    2
    Rep Power
    0

    Default JAXB Marshalling

    Namespace is being appended for each element of the marshalled XML file through JAXB

  2. #2
    akbar4ums is offline Member
    Join Date
    Dec 2008
    Posts
    2
    Rep Power
    0

    Default JAXB marshalling

    Hi All,

    I have used JAXB for marshalling and unmarshalling. Namespsce is being added for each element of the marshallled XML file. Following line shows a generated firstName element under the XML file,

    <firstName xmlns:xs="XMLSchema"
    xsi:type="xs:string">Johnson</firstName>

    The namespace xmlns:xs="XMLSchema" is added in each element and the type xsi:type="xs:string" is added for each simple type.
    Where as I expect the elemet as follows,

    <firstName>Johnson</firstName>

    Is there any specific parameter which can be set in the respective xsd or which can be set through code while marshalling, by which I can get the expected XML having no namespace and type appended for its elements.

    Please let me know if anyone knows its solution as early as possible.

    Thanks,
    Akbar

Similar Threads

  1. Custom XML to Java Type Binding using JAXB
    By surajkumar in forum XML
    Replies: 0
    Last Post: 09-02-2008, 01:32 PM
  2. JAXB Unmarshalling
    By prateek in forum XML
    Replies: 0
    Last Post: 07-10-2008, 07:53 PM
  3. Replies: 0
    Last Post: 06-04-2008, 12:26 AM
  4. How to clone a JAXB object ?
    By simon in forum Advanced Java
    Replies: 1
    Last Post: 07-15-2007, 12:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •