• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

xml file - how to ignore space

Guest
Oct 15, 2007 Oct 15, 2007

Copy link to clipboard

Copied

I am creating xml file.But when I create as .xml file it is showing me lots of space between element. How can i remove the space. Let say if i have query it will count as a space.

<Name>
space
i want to remove this space
<Address>sdfsf</Address>


</Name>

thanx
TOPICS
Advanced techniques

Views

266

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 15, 2007 Oct 15, 2007

Copy link to clipboard

Copied

Showing a small snippet of code would probably help with this question.
Assuming one is using CFML to build the XML data, there are quite a
few whitespace management tools built into ColdFusion these days. Some
you may want to investigate are:

<cfprocessingdirective suppresswhitespace="yes">

<cfsetting enablecfoutputonly="yes">

<cfsilent>

And the CF administration settings concerning whitespace.

As well as just building your code to minimize white space.

They all have slightly different caveats and use cases.


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 15, 2007 Oct 15, 2007

Copy link to clipboard

Copied

LATEST
Some combination of
<cfsetting enableCFoutputOnly = "yes|no"
or
<cfprocessingdirective suppressWhiteSpace = "yes|no"

should get you there

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation