You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Kamal Bhatt <kb...@tt.com.au> on 2006/03/21 06:33:55 UTC

Formatted XML

Hi
I was wondering, is it possible to control exactly how your XML is 
displayed? What I am thinking is, it possible to format XML so that it 
looks like this:

<Element1 attr1="one"
                 attr2="two"
                 attr3="three"
                  ...>
    <Element2/>
</Element1>

I take it the serializer is what does this, but how can you get the 
serializer do this? Do I need to write my own?

Cheers.

-- 
Kamal Bhatt



--
Disclaimer: This email is confidential and may contain privileged information for the sole use of the person or business to which it is addressed. If you are not the intended recipient, please notify the sender by return e-mail or phone as you must not view, disseminate, distribute or copy this email without our consent. We do not accept any liability in connection with any computer virus, data corruption, incompleteness, or unauthorised amendment of this email. It is the sole responsibility of the receiver to scan for viruses before opening.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Formatted XML

Posted by Kamal Bhatt <kb...@tt.com.au>.
Sorry,

I should probably explain why I want to pretty print XML. I would like 
to output example XML from XSD schemas. This could then be used in 
documentation of schemas.

That is why simply getting a pretty printer does not meet my needs. Any 
ideas?

Cheers.

Kamal.

ian.d.stewart@jpmchase.com wrote:

>Hi Kamal,
>
>What you're looking for is what's called a "pretty printer".  It's not
>something I've had any need for myself, but if you google for "XML pretty
>printer", this should get you started in the right direction.
>
>
>HTH,
>Ian
>
>It's better to be hated for who you are
>than loved for who you are not
>
>Ian D. Stewart
>Appl Dev Analyst-Advisory, DCS Automation
>JPMorganChase Global Technology Infrastructure
>Phone: (614) 244-2564
>Pager: (888) 260-0078
>
>
>                                                                                                                                       
>                      Kamal Bhatt                                                                                                      
>                      <kbhatt@tt.com.au        To:       users@cocoon.apache.org                                                       
>                      >                        cc:                                                                                     
>                                               Subject:  Formatted XML                                                                 
>                      03/21/2006 12:33                                                                                                 
>                      AM                                                                                                               
>                      Please respond to                                                                                                
>                      users                                                                                                            
>                                                                                                                                       
>
>
>
>
>
>Hi
>I was wondering, is it possible to control exactly how your XML is
>displayed? What I am thinking is, it possible to format XML so that it
>looks like this:
>
><Element1 attr1="one"
>                 attr2="two"
>                 attr3="three"
>                  ...>
>    <Element2/>
></Element1>
>
>I take it the serializer is what does this, but how can you get the
>serializer do this? Do I need to write my own?
>
>Cheers.
>
>--
>Kamal Bhatt
>
>
>
>--
>Disclaimer: This email is confidential and may contain privileged
>information for the sole use of the person or business to which it is
>addressed. If you are not the intended recipient, please notify the sender
>by return e-mail or phone as you must not view, disseminate, distribute or
>copy this email without our consent. We do not accept any liability in
>connection with any computer virus, data corruption, incompleteness, or
>unauthorised amendment of this email. It is the sole responsibility of the
>receiver to scan for viruses before opening.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>  
>



--
Disclaimer: This email is confidential and may contain privileged information for the sole use of the person or business to which it is addressed. If you are not the intended recipient, please notify the sender by return e-mail or phone as you must not view, disseminate, distribute or copy this email without our consent. We do not accept any liability in connection with any computer virus, data corruption, incompleteness, or unauthorised amendment of this email. It is the sole responsibility of the receiver to scan for viruses before opening.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Formatted XML

Posted by ia...@jpmchase.com.
Hi Kamal,

What you're looking for is what's called a "pretty printer".  It's not
something I've had any need for myself, but if you google for "XML pretty
printer", this should get you started in the right direction.


HTH,
Ian

It's better to be hated for who you are
than loved for who you are not

Ian D. Stewart
Appl Dev Analyst-Advisory, DCS Automation
JPMorganChase Global Technology Infrastructure
Phone: (614) 244-2564
Pager: (888) 260-0078


                                                                                                                                       
                      Kamal Bhatt                                                                                                      
                      <kbhatt@tt.com.au        To:       users@cocoon.apache.org                                                       
                      >                        cc:                                                                                     
                                               Subject:  Formatted XML                                                                 
                      03/21/2006 12:33                                                                                                 
                      AM                                                                                                               
                      Please respond to                                                                                                
                      users                                                                                                            
                                                                                                                                       





Hi
I was wondering, is it possible to control exactly how your XML is
displayed? What I am thinking is, it possible to format XML so that it
looks like this:

<Element1 attr1="one"
                 attr2="two"
                 attr3="three"
                  ...>
    <Element2/>
</Element1>

I take it the serializer is what does this, but how can you get the
serializer do this? Do I need to write my own?

Cheers.

--
Kamal Bhatt



--
Disclaimer: This email is confidential and may contain privileged
information for the sole use of the person or business to which it is
addressed. If you are not the intended recipient, please notify the sender
by return e-mail or phone as you must not view, disseminate, distribute or
copy this email without our consent. We do not accept any liability in
connection with any computer virus, data corruption, incompleteness, or
unauthorised amendment of this email. It is the sole responsibility of the
receiver to scan for viruses before opening.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org