Perhaps I'm missing something, but what makes you expect InnerXml to be set to anything? You've created a private mutable value containing some XML, but it doesn't appear to be connected to anything which is publicly visible...

By on 5/14/2010 8:30 PM ()

Thanks, so, how do I create something that's publically visible? I thought declaring the type public was enough? Url's to doc's, whatever, still not getting it, trying different public constructs ... but don't understand it so need that

<edit>

Think I found it ... [link:msdn.microsoft.com]

If I need more help with this will post a new topic, thanks kvb, the clue was what I needed.</edit>

By on 5/14/2010 8:34 PM ()

Not getting it ... are there any code samples for this? Tried a ton of ways but newbie so not getting the syntax.

By on 5/14/2010 10:27 PM ()

You're using both inheritance and composition, that doesn't sound really useful. Remove the inherit line and expose xmlDoc via a read-only property:

1
member this.XmlDoc = xmlDoc
By on 5/15/2010 4:48 AM ()

You're using both inheritance and composition, that doesn't sound really useful. Remove the inherit line and expose xmlDoc via a read-only property:

1
member this.XmlDoc = xmlDoc

Thanks Kha, newbie, I added the inherit according to code samples for classes, not because I knew what's it's doing. When I take that out the whole thing bombs, so, all I'm doing is loading an xml doc from a url. Any real code samples would help ... this project is a website for archeologists to enter data for a cloud so need the f# for ||-asynch on Azure, trying to deploy at the end of the week, not trying anything fancy.

By on 5/15/2010 7:04 AM ()

Latest try, this returns the string name of the object to c#, better'n null's so making progress ... lol!!

f#**********
type public archDES_xml(iURL:string) =
let xmlDoc (loadXML : XmlDocument -> XmlDocument) iURL = loadXML

member this.XmlDoc = xmlDoc

c#**********
private string getXML()
{
var url = "[link:localhost]
var doc = new Common.archDES_xml(url);
string req = doc.ToString();
return req;
}

By on 5/15/2010 6:30 PM ()

Think I found a problem, I've tried quite a few things but this should load the file and doesn't, so load is null before setting the httpcontext. So, what am I doing wrong, seems valid code, no errors:

type public xmlDoc() =
let doc = new XmlDocument()

member this.xmlDoc = doc

type public archDES_xml(iURL:string) =
let url = iURL
let doc = new xmlDoc()
let load = doc.xmlDoc.Load(url)
let cxt = System.Web.HttpContext.Current

member this.resp = cxt.Response.Write(load)

By on 5/16/2010 8:32 AM ()

Forgot to add interactive code when I run it:

> archDES_xml("[link:localhost]
val it : archDES_xml = FSI_0003+archDES_xml {resp = ?;}
>

It should be populating an xml doc with load ...

By on 5/16/2010 11:28 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper