Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can .NET read XML strings?
Message
 
To
20/03/2007 12:21:35
General information
Forum:
ASP.NET
Category:
XML
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01206130
Message ID:
01206132
Views:
10
>Hi Guys!
>
>New to .NET from Decades of VFP so think I may hassle the forum with "how do I do this in .NET", so sorry in advance ;-)
>
>In VFP I have got into the habit of storing settings and mixed data in XML strings in memo fields, it avoids modi struct of a table when you want to add one small setting and enables passing of multiple settings as a single parameter.
>
>So my string would be something like:
>
>Hi There
>123
>

>
>I am trying to do something similiar in .NET and passing settings form a VFP COM DLL. but System.XML.XmlTextReader() does not like strings, only files?
>is there a way to pass strings? or is there another reader I can use?
>
>
>Regards
>
>
>Gary Williams.


A lot of things in .NET work based on "streams". Streams could be data coming from a file or from the internet, or from memory, or you can even create your own, or... So streams are very powerful which is why they are used often, and that is exactly what you encounter with the class you are using, I would guess.

So that is just to give you some background information on the behavior you are seeing. For your particular scenario, there is a simple way to achieve what you want without streams:
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
doc.LoadXml(xmlString);
This is basically the XML DOM just like in VFP.


Markus




Markus Egger
President, EPS Software Corp
Author, Advanced Object Oriented Programming with VFP6
Publisher, CoDe Magazine
Microsoft MVP since 1995
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform