473,396 Members | 1,760 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,396 software developers and data experts.

XML Control

I have an XML control on a page which is populated dynamically from an XML
string and then transformed using an external XLST file. This works
perfectly.

Once a user competes parts of the XML form on the page contained within the
XML control, I want to extract the FULL XML content as a string. How do I do
this.

TIA
Nov 18 '05 #1
9 1358
Hi,
Try <xml_control>.Document.InnerXml

"Steve" <St***@discussions.microsoft.com> wrote in message
news:0B**********************************@microsof t.com...
I have an XML control on a page which is populated dynamically from an XML
string and then transformed using an external XLST file. This works
perfectly.

Once a user competes parts of the XML form on the page contained within the
XML control, I want to extract the FULL XML content as a string. How do I
do
this.

TIA
Nov 18 '05 #2
Still no joy...
Herewith the code snippet:

Dim ls_xml as string
Dim myxml as Xml=ctype(findcontrol("xml11"),xml)
if (not myxml is nothing) then
ls_xml=myxml.document.InnerXml
end if

This triggers an "object reference not set to an instance of an object" error.

Any ideas will be appreciated.

Steve
"Shiva" wrote:
Hi,
Try <xml_control>.Document.InnerXml

"Steve" <St***@discussions.microsoft.com> wrote in message
news:0B**********************************@microsof t.com...
I have an XML control on a page which is populated dynamically from an XML
string and then transformed using an external XLST file. This works
perfectly.

Once a user competes parts of the XML form on the page contained within the
XML control, I want to extract the FULL XML content as a string. How do I
do
this.

TIA

Nov 18 '05 #3
Hi,
If the control doesn't have any XML associated with it, then you will get a
null reference. So, you might wan to add a check for myxml.Document before
accessing the InnerXml.

HTH
"Steve" <St***@discussions.microsoft.com> wrote in message
news:1B**********************************@microsof t.com...
Still no joy...
Herewith the code snippet:

Dim ls_xml as string
Dim myxml as Xml=ctype(findcontrol("xml11"),xml)
if (not myxml is nothing) then
ls_xml=myxml.document.InnerXml
end if

This triggers an "object reference not set to an instance of an object"
error.

Any ideas will be appreciated.

Steve
"Shiva" wrote:
Hi,
Try <xml_control>.Document.InnerXml

"Steve" <St***@discussions.microsoft.com> wrote in message
news:0B**********************************@microsof t.com...
I have an XML control on a page which is populated dynamically from an XML
string and then transformed using an external XLST file. This works
perfectly.

Once a user competes parts of the XML form on the page contained within the XML control, I want to extract the FULL XML content as a string. How do I
do
this.

TIA

Nov 18 '05 #4
Thanks for your response Shiva!!
I have checked the contents of myxml.document and it is null, yet the
results of the xml transformation are displayed on the page. I'm new to this
and a little lost.

What I have done is:

1. I have a treeview on a page.
2. When a user selects the child tree in the treeview, the XML control is
made visible and the XML string is loaded and transformed (all works well).
3. The user edits two or three fields in the XML & then clicks a save button.
4. I want to save their edit back into an XML string.

Steve

"Shiva" wrote:
Hi,
If the control doesn't have any XML associated with it, then you will get a
null reference. So, you might wan to add a check for myxml.Document before
accessing the InnerXml.

HTH
"Steve" <St***@discussions.microsoft.com> wrote in message
news:1B**********************************@microsof t.com...
Still no joy...
Herewith the code snippet:

Dim ls_xml as string
Dim myxml as Xml=ctype(findcontrol("xml11"),xml)
if (not myxml is nothing) then
ls_xml=myxml.document.InnerXml
end if

This triggers an "object reference not set to an instance of an object"
error.

Any ideas will be appreciated.

Steve
"Shiva" wrote:
Hi,
Try <xml_control>.Document.InnerXml

"Steve" <St***@discussions.microsoft.com> wrote in message
news:0B**********************************@microsof t.com...
I have an XML control on a page which is populated dynamically from an XML
string and then transformed using an external XLST file. This works
perfectly.

Once a user competes parts of the XML form on the page contained within

the
XML control, I want to extract the FULL XML content as a string. How do I
do
this.

TIA


Nov 18 '05 #5
Hi Steve,
AFAIK, the changes made to the transformed XML do not get bound back to the
XML control. So, you may have to refer to Request.Form collection to get the
modified XML values.

"Steve" <St***@discussions.microsoft.com> wrote in message
news:DC**********************************@microsof t.com...
Thanks for your response Shiva!!
I have checked the contents of myxml.document and it is null, yet the
results of the xml transformation are displayed on the page. I'm new to
this
and a little lost.

What I have done is:

1. I have a treeview on a page.
2. When a user selects the child tree in the treeview, the XML control is
made visible and the XML string is loaded and transformed (all works well).
3. The user edits two or three fields in the XML & then clicks a save
button.
4. I want to save their edit back into an XML string.

Steve

"Shiva" wrote:
Hi,
If the control doesn't have any XML associated with it, then you will get a null reference. So, you might wan to add a check for myxml.Document before
accessing the InnerXml.

HTH
"Steve" <St***@discussions.microsoft.com> wrote in message
news:1B**********************************@microsof t.com...
Still no joy...
Herewith the code snippet:

Dim ls_xml as string
Dim myxml as Xml=ctype(findcontrol("xml11"),xml)
if (not myxml is nothing) then
ls_xml=myxml.document.InnerXml
end if

This triggers an "object reference not set to an instance of an object"
error.

Any ideas will be appreciated.

Steve
"Shiva" wrote:
Hi,
Try <xml_control>.Document.InnerXml

"Steve" <St***@discussions.microsoft.com> wrote in message
news:0B**********************************@microsof t.com...
I have an XML control on a page which is populated dynamically from an XML string and then transformed using an external XLST file. This works
perfectly.

Once a user competes parts of the XML form on the page contained within

the
XML control, I want to extract the FULL XML content as a string. How do I do
this.

TIA


Nov 18 '05 #6
I've just spent the day attempting to get the data out of the XML control on
the page without success. If you have an an example of how to use the
Request.Form collection I will very much appreciate it.

When I step through any code referring to this all I can see is an array of
6 items, none of which give me a clue to where the data is.

Steve

"Shiva" wrote:
Hi Steve,
AFAIK, the changes made to the transformed XML do not get bound back to the
XML control. So, you may have to refer to Request.Form collection to get the
modified XML values.

"Steve" <St***@discussions.microsoft.com> wrote in message
news:DC**********************************@microsof t.com...
Thanks for your response Shiva!!
I have checked the contents of myxml.document and it is null, yet the
results of the xml transformation are displayed on the page. I'm new to
this
and a little lost.

What I have done is:

1. I have a treeview on a page.
2. When a user selects the child tree in the treeview, the XML control is
made visible and the XML string is loaded and transformed (all works well).
3. The user edits two or three fields in the XML & then clicks a save
button.
4. I want to save their edit back into an XML string.

Steve

"Shiva" wrote:
Hi,
If the control doesn't have any XML associated with it, then you will get

a
null reference. So, you might wan to add a check for myxml.Document before
accessing the InnerXml.

HTH
"Steve" <St***@discussions.microsoft.com> wrote in message
news:1B**********************************@microsof t.com...
Still no joy...
Herewith the code snippet:

Dim ls_xml as string
Dim myxml as Xml=ctype(findcontrol("xml11"),xml)
if (not myxml is nothing) then
ls_xml=myxml.document.InnerXml
end if

This triggers an "object reference not set to an instance of an object"
error.

Any ideas will be appreciated.

Steve
"Shiva" wrote:
Hi,
Try <xml_control>.Document.InnerXml

"Steve" <St***@discussions.microsoft.com> wrote in message
news:0B**********************************@microsof t.com...
I have an XML control on a page which is populated dynamically from an XML string and then transformed using an external XLST file. This works
perfectly.

Once a user competes parts of the XML form on the page contained within

the
XML control, I want to extract the FULL XML content as a string. How do I do
this.

TIA



Nov 18 '05 #7
Hi,
I assume you are using <INPUT TYPE=TEXT> tags in the transformation for
making the text editable. If this is the case, then they should be available
in the Request.Form collection. If not, please let us know how you are
making the XML editable so that we can think of alternative ways.

"Steve" <St***@discussions.microsoft.com> wrote in message
news:90**********************************@microsof t.com...
I've just spent the day attempting to get the data out of the XML control on
the page without success. If you have an an example of how to use the
Request.Form collection I will very much appreciate it.

When I step through any code referring to this all I can see is an array of
6 items, none of which give me a clue to where the data is.

Steve

"Shiva" wrote:
Hi Steve,
AFAIK, the changes made to the transformed XML do not get bound back to the XML control. So, you may have to refer to Request.Form collection to get the modified XML values.

"Steve" <St***@discussions.microsoft.com> wrote in message
news:DC**********************************@microsof t.com...
Thanks for your response Shiva!!
I have checked the contents of myxml.document and it is null, yet the
results of the xml transformation are displayed on the page. I'm new to
this
and a little lost.

What I have done is:

1. I have a treeview on a page.
2. When a user selects the child tree in the treeview, the XML control is
made visible and the XML string is loaded and transformed (all works well). 3. The user edits two or three fields in the XML & then clicks a save
button.
4. I want to save their edit back into an XML string.

Steve

"Shiva" wrote:
Hi,
If the control doesn't have any XML associated with it, then you will get
a
null reference. So, you might wan to add a check for myxml.Document before accessing the InnerXml.

HTH
"Steve" <St***@discussions.microsoft.com> wrote in message
news:1B**********************************@microsof t.com...
Still no joy...
Herewith the code snippet:

Dim ls_xml as string
Dim myxml as Xml=ctype(findcontrol("xml11"),xml)
if (not myxml is nothing) then
ls_xml=myxml.document.InnerXml
end if

This triggers an "object reference not set to an instance of an object"
error.

Any ideas will be appreciated.

Steve
"Shiva" wrote:
Hi,
Try <xml_control>.Document.InnerXml

"Steve" <St***@discussions.microsoft.com> wrote in message
news:0B**********************************@microsof t.com...
I have an XML control on a page which is populated dynamically from an XML string and then transformed using an external XLST file. This works
perfectly.

Once a user competes parts of the XML form on the page contained
within the
XML control, I want to extract the FULL XML content as a string. How
do I do
this.

TIA



Nov 18 '05 #8
How do you make the XML ediable on the web page?

"Steve" <St***@discussions.microsoft.com> wrote in message
news:5F**********************************@microsof t.com...
Yes it's all text. I'm using XML Spy & Stylevision to edit the xlst and xsd
files.

Steve

"Shiva" wrote:
Hi,
I assume you are using <INPUT TYPE=TEXT> tags in the transformation for
making the text editable. If this is the case, then they should be available in the Request.Form collection. If not, please let us know how you are
making the XML editable so that we can think of alternative ways.

"Steve" <St***@discussions.microsoft.com> wrote in message
news:90**********************************@microsof t.com...
I've just spent the day attempting to get the data out of the XML control on the page without success. If you have an an example of how to use the
Request.Form collection I will very much appreciate it.

When I step through any code referring to this all I can see is an array of 6 items, none of which give me a clue to where the data is.

Steve

"Shiva" wrote:
Hi Steve,
AFAIK, the changes made to the transformed XML do not get bound back to the
XML control. So, you may have to refer to Request.Form collection to get

the
modified XML values.

"Steve" <St***@discussions.microsoft.com> wrote in message
news:DC**********************************@microsof t.com...
Thanks for your response Shiva!!
I have checked the contents of myxml.document and it is null, yet the
results of the xml transformation are displayed on the page. I'm new to
this
and a little lost.

What I have done is:

1. I have a treeview on a page.
2. When a user selects the child tree in the treeview, the XML control is
made visible and the XML string is loaded and transformed (all works

well).
3. The user edits two or three fields in the XML & then clicks a save
button.
4. I want to save their edit back into an XML string.

Steve

"Shiva" wrote:
Hi,
If the control doesn't have any XML associated with it, then you will get
a
null reference. So, you might wan to add a check for myxml.Document

before accessing the InnerXml.

HTH
"Steve" <St***@discussions.microsoft.com> wrote in message
news:1B**********************************@microsof t.com...
Still no joy...
Herewith the code snippet:

Dim ls_xml as string
Dim myxml as Xml=ctype(findcontrol("xml11"),xml)
if (not myxml is nothing) then
ls_xml=myxml.document.InnerXml
end if

This triggers an "object reference not set to an instance of an object" error.

Any ideas will be appreciated.

Steve
"Shiva" wrote:

> Hi,
> Try <xml_control>.Document.InnerXml
>
> "Steve" <St***@discussions.microsoft.com> wrote in message
> news:0B**********************************@microsof t.com...
> I have an XML control on a page which is populated dynamically from
an XML
> string and then transformed using an external XLST file. This works
> perfectly.
>
> Once a user competes parts of the XML form on the page contained

within the
> XML control, I want to extract the FULL XML content as a string.

How do
I
> do
> this.
>
> TIA
>
>
>



Nov 18 '05 #9
Yes the xml content is dsiplaying correctly and the user is able to type
results into each of the embedded edit boxes. All appears to be OK.

Steve

"Shiva" wrote:
How do you make the XML ediable on the web page?

"Steve" <St***@discussions.microsoft.com> wrote in message
news:5F**********************************@microsof t.com...
Yes it's all text. I'm using XML Spy & Stylevision to edit the xlst and xsd
files.

Steve

"Shiva" wrote:
Hi,
I assume you are using <INPUT TYPE=TEXT> tags in the transformation for
making the text editable. If this is the case, then they should be

available
in the Request.Form collection. If not, please let us know how you are
making the XML editable so that we can think of alternative ways.

"Steve" <St***@discussions.microsoft.com> wrote in message
news:90**********************************@microsof t.com...
I've just spent the day attempting to get the data out of the XML control

on
the page without success. If you have an an example of how to use the
Request.Form collection I will very much appreciate it.

When I step through any code referring to this all I can see is an array

of
6 items, none of which give me a clue to where the data is.

Steve

"Shiva" wrote:
Hi Steve,
AFAIK, the changes made to the transformed XML do not get bound back to

the
XML control. So, you may have to refer to Request.Form collection to get

the
modified XML values.

"Steve" <St***@discussions.microsoft.com> wrote in message
news:DC**********************************@microsof t.com...
Thanks for your response Shiva!!
I have checked the contents of myxml.document and it is null, yet the
results of the xml transformation are displayed on the page. I'm new to
this
and a little lost.

What I have done is:

1. I have a treeview on a page.
2. When a user selects the child tree in the treeview, the XML control is made visible and the XML string is loaded and transformed (all works

well).
3. The user edits two or three fields in the XML & then clicks a save
button.
4. I want to save their edit back into an XML string.

Steve

"Shiva" wrote:

> Hi,
> If the control doesn't have any XML associated with it, then you will

get
a
> null reference. So, you might wan to add a check for myxml.Document

before
> accessing the InnerXml.
>
> HTH
> "Steve" <St***@discussions.microsoft.com> wrote in message
> news:1B**********************************@microsof t.com...
> Still no joy...
> Herewith the code snippet:
>
> Dim ls_xml as string
> Dim myxml as Xml=ctype(findcontrol("xml11"),xml)
> if (not myxml is nothing) then
> ls_xml=myxml.document.InnerXml
> end if
>
> This triggers an "object reference not set to an instance of an object" > error.
>
> Any ideas will be appreciated.
>
> Steve
>
>
> "Shiva" wrote:
>
> > Hi,
> > Try <xml_control>.Document.InnerXml
> >
> > "Steve" <St***@discussions.microsoft.com> wrote in message
> > news:0B**********************************@microsof t.com...
> > I have an XML control on a page which is populated dynamically from an XML
> > string and then transformed using an external XLST file. This works
> > perfectly.
> >
> > Once a user competes parts of the XML form on the page contained

within
> the
> > XML control, I want to extract the FULL XML content as a string.

How
do
I
> > do
> > this.
> >
> > TIA
> >
> >
> >
>
>
>



Nov 18 '05 #10

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

Similar topics

6
by: Bruce Rusk | last post by:
I'm using Stephen Lebans' RTF2 control in a report, and have discovered what may be a slight bug in it. I have a lot of non-Western language (Chinese) text in my RTF field, and such records get...
6
by: martin | last post by:
Hi, I am a web page and a web user control. My web user control is placed in my web page using the following directive <%@ Register TagPrefix="uc1" TagName="Header"...
3
by: Eric | last post by:
I have built a composite user web control that I want to create dynamically. The form will contain a variable number of these controls and as well some of the contents of the user web control...
2
by: John Lau | last post by:
Hi, Is there documentation that talks about the page lifecycle, the lifecycle of controls on the page, and the rendering of inline code, in a single document? Thanks, John
5
by: serge calderara | last post by:
Dear all, I am new in asp.net and prepare myself for exam I still have dificulties to understand the difference between server control and HTML control. Okey things whcih are clear are the fact...
2
by: Mike | last post by:
Hi, I am strugling with a simple problem which I can't seem to resolve. I have an asp.net page which contains a server-control (flytreeview, which is a kind of a tree to be exact). The tree is...
14
by: Rolf Welskes | last post by:
Hello, I have an ObjectDataSource which has as business-object a simple array of strings. No problem. I have an own (custom) control to which I give the DataSourceId and in the custom-control...
2
by: rn5a | last post by:
Assume that a user control (MyUC.ascx) encapsulates 2 TextBoxes with the IDs 'txt1' & 'txt2' respectively. To use this user control in an ASPX page, the following Register directive will be...
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
1
GaryTexmo
by: GaryTexmo | last post by:
In my last insight, http://bytes.com/topic/c-sharp/insights/909141-object-scaling-varying-resolutions, I talked about scaling objects to a form's size so that it would always draw with the correct...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.