Answered by:
XSLT and XML formatting

Question
-
Hi guys,
Quick question hopefully. I have a xslt and xml file (serialised class). Does anyone know the xslt commands/syntax which would allow me to display the xml without formatting.
ie:
XML before:<xml><test>test</test></xml>
XML After:<xml><test>test</test></xml>
I have different XSLT files, which do different formatting, this is just a odd instance where I don;t want the xml to be formatted.
Thank you.
Kelvin
- Moved by John Saunders Monday, January 23, 2012 8:22 PM xml q (From:ASMX Web Services and XML Serialization)
Monday, January 23, 2012 3:43 PM
Answers
-
Well as long as the XSLT stylesheet has
<xsl:output indent="no"/>
you shouldn't get any additional indentation or "formatting" by running the stylesheet on your XML.
That's all we can suggest without seeing details of the XSLT.
MVP Data Platform Development My blog- Proposed as answer by Shay Feldman Friday, January 27, 2012 5:05 PM
- Marked as answer by Michael Sun [MSFT]Microsoft employee, Moderator Monday, February 6, 2012 1:40 AM
Tuesday, January 24, 2012 11:09 AM -
For the .NET parser see this article in MSDN
This is one more good explanation with good list of links to the main standards."xmldoc= new ActiveXObject("Msxml2.DOMDocument.5.0"); xmldoc.preserveWhiteSpace = true; xmldoc.load(url);"
Leonid Ganeline [BizTalk MVP] BizTalk and 0MQ (ZeroMQ)- Proposed as answer by Shay Feldman Friday, January 27, 2012 5:05 PM
- Marked as answer by Michael Sun [MSFT]Microsoft employee, Moderator Monday, February 6, 2012 1:40 AM
Tuesday, January 24, 2012 2:09 AM
All replies
-
For the .NET parser see this article in MSDN
This is one more good explanation with good list of links to the main standards."xmldoc= new ActiveXObject("Msxml2.DOMDocument.5.0"); xmldoc.preserveWhiteSpace = true; xmldoc.load(url);"
Leonid Ganeline [BizTalk MVP] BizTalk and 0MQ (ZeroMQ)- Proposed as answer by Shay Feldman Friday, January 27, 2012 5:05 PM
- Marked as answer by Michael Sun [MSFT]Microsoft employee, Moderator Monday, February 6, 2012 1:40 AM
Tuesday, January 24, 2012 2:09 AM -
Well as long as the XSLT stylesheet has
<xsl:output indent="no"/>
you shouldn't get any additional indentation or "formatting" by running the stylesheet on your XML.
That's all we can suggest without seeing details of the XSLT.
MVP Data Platform Development My blog- Proposed as answer by Shay Feldman Friday, January 27, 2012 5:05 PM
- Marked as answer by Michael Sun [MSFT]Microsoft employee, Moderator Monday, February 6, 2012 1:40 AM
Tuesday, January 24, 2012 11:09 AM