473,387 Members | 1,585 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Why does VS not format an XML document?

I'm new to XML. I'm noticing that certain XML documents, when viewing XML
text, do not format in VS 2005. Instead, everything is rendered on one long
line. In Internet Explorer, the text formats fine. What do I need to do to
get VS to format XML text for me?

Thanks,

Randy Neall
Jun 23 '06 #1
4 2253


Randolph Neall wrote:
I'm new to XML. I'm noticing that certain XML documents, when viewing XML
text, do not format in VS 2005. Instead, everything is rendered on one long
line. In Internet Explorer, the text formats fine. What do I need to do to
get VS to format XML text for me?


Internet Explorer applies an XSL stylesheet to render a collapsible tree
of the document.
If VS shows everything on one line then I assume the XML source document
has no line breaks so you need to run indentation on it.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Jun 23 '06 #2
If there are no linebreaks in the file, you will not get auto-formatting.
If this is the case, just hit "Format the whole document" button on the
toolbar (or use Edit | Advanced | Format Document menu ooption or Ctrl+K,
Ctrl+D).

Also, some XML documents contain instructions to preserve whitespace. In
this case, VS will not format the portions of the document to which these
instructions apply.

--
Stan Kitsis
Program Manager, XML Tools & Technologies
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
"Randolph Neall" <ra***********@veracitycomputing.com> wrote in message
news:Ok**************@TK2MSFTNGP03.phx.gbl...
I'm new to XML. I'm noticing that certain XML documents, when viewing XML
text, do not format in VS 2005. Instead, everything is rendered on one
long
line. In Internet Explorer, the text formats fine. What do I need to do to
get VS to format XML text for me?

Thanks,

Randy Neall

Jun 23 '06 #3
Just what I needed. Thanks very much Stan.

Randy
"Stan Kitsis [MSFT]" <sk***@microsoft.com> wrote in message
news:44********@news.microsoft.com...
If there are no linebreaks in the file, you will not get auto-formatting.
If this is the case, just hit "Format the whole document" button on the
toolbar (or use Edit | Advanced | Format Document menu ooption or Ctrl+K,
Ctrl+D).

Also, some XML documents contain instructions to preserve whitespace. In
this case, VS will not format the portions of the document to which these
instructions apply.

--
Stan Kitsis
Program Manager, XML Tools & Technologies
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.

"Randolph Neall" <ra***********@veracitycomputing.com> wrote in message
news:Ok**************@TK2MSFTNGP03.phx.gbl...
I'm new to XML. I'm noticing that certain XML documents, when viewing XML text, do not format in VS 2005. Instead, everything is rendered on one
long
line. In Internet Explorer, the text formats fine. What do I need to do to get VS to format XML text for me?

Thanks,

Randy Neall


Jun 23 '06 #4
Thank you very much!

Randy
"Martin Honnen" <ma*******@yahoo.de> wrote in message
news:uk**************@TK2MSFTNGP05.phx.gbl...


Randolph Neall wrote:
I'm new to XML. I'm noticing that certain XML documents, when viewing XML text, do not format in VS 2005. Instead, everything is rendered on one long line. In Internet Explorer, the text formats fine. What do I need to do to get VS to format XML text for me?


Internet Explorer applies an XSL stylesheet to render a collapsible tree
of the document.
If VS shows everything on one line then I assume the XML source document
has no line breaks so you need to run indentation on it.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/

Jun 23 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: amith | last post by:
hi I have written javascript for comparing two dates in US format and finding out whether the start date is greater than the end date and vice versa. In this attempt i have instantiated the...
6
by: Louise | last post by:
Hi I have written an HTML pages which does not have any colour specifying tags as far I know. When I view this in an Microsoft internet explorer browser it appears with a white background and...
0
by: JD | last post by:
While reading through the "shortcuts" topic in the help, I saw that there's a "Format Document" option - CTRL+K, CTRL+D. Cool... so I go into a .cs source file (this is a winforms project) and hit...
3
by: Alexander Gräf | last post by:
Hello, I'm stuck with a simple problem, for which I don't have a solution. I basically have an XML file containing fragments of plain text and html, in several languages: <?xml version="1.0"...
6
by: Stuart McGraw | last post by:
I am looking for a VBA "format" or "template" function, that is, a function that takes a format string and a varying number of arguments, and substitutes the argument values into the format string...
0
by: Richard Gregory | last post by:
Hi, I have the wsdl below, for an Axis web service, and when I select Add Web Refernce in Visual Studio the proxy is missing a class representing the returnedElementsType (see reference.cs below...
1
by: Randolph Neall | last post by:
On advice of Stan Kitsis on this forum, I was able to format in VS an XML document by Selecting Edit / Advanced / Format document. It worked. But now I am attempting to do the same thing again,...
1
by: kamleshsharmadts | last post by:
I am using Ajax with struts in web application. from jsp i am calling a function of ajax.js onclick of a button. code of that call function which calling from jsp given as below:- ...
16
by: Alexio | last post by:
Am new to javascript. I need to format the currency in the as numbers are entered in textboxes. I can format the currency in the calculations and display in the totals but can not figure out how to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.