Re: [xsl] Need to preserve Whitespace in leading/trainling XML using vb.net

Subject: Re: [xsl] Need to preserve Whitespace in leading/trainling XML using vb.net
From: Eike Jordan <jordan@xxxxxxxxxxxxx>
Date: Fri, 29 Apr 2011 09:12:09 +0200
Hi Sangha,
there's nothing wrong with your code sample. I think you should ask people
that have some experiences with AxWebBrowser.

~eike

On 04/29/2011 08:41 AM, Sen, Sanghamitra wrote:

Hi Brandon,


Let me try to explain what I want to achieve.

I am using VS 2003 code in in VB.Net
I am sending an XML request through vb code. And at the same time user can see the xml content of my request in AxWebBrowser.
But what I am facing problem is if the xml node's data contains leading and trailing spaces then it just ignores spaces when I see the xml.
I m using XSL ver 1.0 and XSL code is below

<?xml version="1.0"?>
<xsl:stylesheet  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
      version="1.0">

<xsl:preserve-space elements="notificationNumber"/>

   <xsl:template match="@*|node()">
    <xsl:copy>
     <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
   </xsl:template>
</xsl:stylesheet>

Here I want to preserve whitespaces of the element "notificationNumber"
I am using XslTransform class in vb code.

Say node contains Test1234 with spaces like<notificationNumber>  Test1234</notificationNumber>
I want to display the same way when I look into XML in browser.

Pls let me know If you would need any other informations.

Thx,
Sangha

-----Original Message-----
From: Brandon Ibach [mailto:brandon.ibach@xxxxxxxxxxxxxxxxxxx]
Sent: Thursday, April 28, 2011 11:32 PM
To: xsl-list
Subject: Re: [xsl] Need to preserve Whitespace in leading/trainling XML using vb.net

I'm not sure what you're asking. You don't mention how XSL is involved, so this may be off-topic for this list.

Perhaps you can tell us how you've tried to solve the problem you're having and how that solution didn't work. That should help us understand of what you're doing and help to pose a more specific question (which is more likely to get a quick answer).

-Brandon :)


On Thu, Apr 28, 2011 at 9:09 AM, Sen, Sanghamitra<sanghamitra_sen@xxxxxxx> wrote:

Hi,


  I have a requirement that xml should be displayed as shown in view
source  means the format should be intact . for example some data in
element coming as whitespaces. How to display leading/ trailing space
in a data in xml?
  I am using  MS  vbnet 2003.

Thanks for your help in advance,
  Sangha

This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity
to which it is addressed. If the reader of this e-mail is not the
intended recipient or his or her authorized agent, the reader is
hereby notified that any dissemination, distribution or copying of
this e-mail is prohibited. If you have received this e-mail in error,
please notify the sender by replying to this message and delete this e-mail immediately.


This e-mail, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity
to which it is addressed. If the reader of this e-mail is not the intended
recipient or his or her authorized agent, the reader is hereby notified
that any dissemination, distribution or copying of this e-mail is
prohibited. If you have received this e-mail in error, please notify the
sender by replying to this message and delete this e-mail immediately.


-- Eike Jordan <jordan@xxxxxxxxxxxxx>

| FIZ CHEMIE BERLIN
| Franklin Str. 11               ------    ,__o
| 10587 Berlin                  ------   _-\_<,
|                              ------   (+)/'(+)
| Tel. : 0049-30-39977 214

Current Thread