XML Control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Hi,
Try <xml_control>.Document.InnerXml

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
 
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
 
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
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
 
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
 
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.

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
 
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
 
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.

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
 
How do you make the XML ediable on the web page?

Yes it's all text. I'm using XML Spy & Stylevision to edit the xlst and xsd
files.

Steve
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top