Loading ...
Sorry, an error occurred while loading the content.
 

How to stop encoding & to & in xml.

Expand Messages
  • Ravikiran
    I am marshalling a java object into xml file.In the java object i am setting a url which consists of & in it,after marshalling through JAXP parser it converts
    Message 1 of 2 , Feb 23, 2007
      I am marshalling a java object into xml file.In the java
      object i am setting a url which consists of & in it,after marshalling
      through JAXP parser it converts into &.Can anyone help me in this
      regard to stop conversion of & to &.
    • Ronald Bourret
      You can t. In XML, an ampersand is used as the first character of an entity reference. If the & is not converted to &, the XML parser will return an error
      Message 2 of 2 , Feb 23, 2007
        You can't.

        In XML, an ampersand is used as the first character of an entity
        reference. If the & is not converted to &, the XML parser will
        return an error when it parses the XML document.

        Ravikiran wrote:
        > I am marshalling a java object into xml file.In the java
        > object i am setting a url which consists of & in it,after marshalling
        > through JAXP parser it converts into &.Can anyone help me in this
        > regard to stop conversion of & to &.
      Your message has been successfully submitted and would be delivered to recipients shortly.