Read Write

xml

    Next

  • 1. Filtering issues
    Hello, I'm hoping to get some opinions on this issue: I'm working on a web-based application that displays XML data with a nice XSL stylesheet, in a cool grid. Now what I want to add is some filtering functionality, comparable to what is offered in the non-web version. Is it possible to use XSL for filtering functionalities such as combining 2 or more conditions, disjunctive and conjunctive filtering? Or can I just implement 1 filter condition at a time with XSL? I would greatly appreciate your insights on this! Thanks, Shaz
  • 2. Merits of Using MSXML
    H We are currently developing applications for clients, most commonly in a Windows 2000/ IIS 5.0 / SQL Server 2000 corporate intranet environment We predominately use MSXML to create XML documents and apply XSLT style sheets. In this way we require minmal ASP code, since most data processing and presentation operations are performed by XSLT. This means that our applications can be easily modified to run on different platforms A rival competitor has suggested to one of our most important clients that this approach is flawed, primarily since the future of XML and XSLT technologies is uncertain. They, themselves, would have used a more traditional approach using straight ASP or other middle products, like Crystal Reports for example I would really love to hear Microsoft's and users opinions on this. I believe XML is where the future lies and much of the US IT industry is already heading this way. I believe my client is best served by having access to the latest technologies. In the case of Web development I believe its XML/XSLT and other related products and technologies What do you think Tim Senior IT Consultant
  • 3. iframes
    Dont know if this the right place, but here goes. My computer will not allow me to see any pages done in iframes....I cannot find a setting?...clueless....windows xp pro,IE6,can someone help....tranzmission01(remove) @hotmail.com

Read Write

Postby SDF » Wed, 19 Jan 2005 06:52:45 GMT

I'm going in circles with
TextReader,TextWriter,StreamReader....StringBuilder....XMLTextReader...


I need two functions:  One that will open a flat file "Test.xml" so that I
can insert the contents of the that XML file into a single field in a
database as text.  Which object is best for that?

I also need to query the contents of that field and parse it - I assume with
the XMLtextReader - what's the the best way to take the text contents of
that field and use it as an XMLTextReader?

Thank you so much,

Scott





Re: Read Write

Postby Han » Wed, 19 Jan 2005 16:50:52 GMT

That's impossible with SQL versions earlier than SQL2005.

At best, you can set a field as varchar, and save your XML there as text. 
You can't query the xml the xml way.

With SQL2005, now beta2, you have xml type field and xquery. You can 
save/retrieve the xml there with xmlTextReader.

-- 
Pohwan Han. Seoul. Have a nice day.






Similar Threads:

1.Reading / Writing XML files?

Maybe I'm researching this too much... ?  But after all this reading, I'm 
still not sure if reading from and writing to XML files is feasible with 
Compact Framework development (VB.net).

I have developed a PPC app that communicates through a SQLserver.  However, 
now the spec requires that we give the operators an option to send/receive 
that same data via XML files for remote locations.  The XML files might even 
be placed on diskette and mailed to and from the host system location.

I'm reading that XML is supported, that it isn't supported and that its 
partially supported in the compact framework.  Which is true??

At this point, it doesn't look like I'll have any control over the XML file 
specs.  But if I did (or do), are there any specs that I should make sure we 
stick by?  I'm asking this after reading about integrated schemas, separate 
schemas, etc.

Does the compact framework (or even with the use of OpenNetCF) accommodate 
building and reading XML files?

Thanks. 


2.Why read/write properties for XmlSerialization

Hello,

I have a question about XmlSerialization. I have a class with a private 
field called createDate of the type DateTime. In the constructor of my class 
I use DateTime. Now to create a timestamp that is assigned to the field 
createDate. Because I want to encapsulate as much as possible of my class 
data and don't want clients of my class to change the createDate but only 
read it, I encapsulate the createDate field with a get Property. Now I want 
this class to be the return type of a WebService I created and I want 
consumers of my WebService to be able to read the createDate from the Xml 
response from the WebService, so I added the XmlElementAttribute attribute to 
my CreateDate property. The problem I run into is described on MSDN for the 
XmlElementAttribute:

"Apply the XmlElementAttribute to public fields or public read/write 
properties to control characteristics of the XML elements such as the element 
name and namespace."

So, either the field needs to be public or my property needs to be a 
read/write property. I think public fields are a bad practice in general, and 
by adding a set method to my CreateDate property, I am opening up my class 
more than I want to: clients of my class are now able to set the CreateDate 
which I do not want them to be able to. 

I hope you understand my problem here. Why should the XmlElementAttribute be 
applied to read/write properties only and not to read properties? And what is 
the best practice for this situation? I do want the createDate to be in the 
Xml result of my WebService, but I don't want clients of my class to be able 
to set the createDate.

3.Use XML to read/write a counter variable

Hi,

I am an old vb6 programmer and new to ASP.NET. Please help me on the way.

How can I read/write a variable to a server-file. (maybe XML?) Have to use a 
lock function too i think.

Thanks,
Gert 


4.XML -best method to read/write in NETcf??

I'm trying to use XML to send data to / from a scanner (ppc).  Our current 
vb netcf app connects directly with the sqlserver - however some scanners 
have no network access and the SQLserver is in another location - the host 
application developers are asking us to give the scanners options to 
import/export data via xml files - the xml files will be sent via archaic 
means.  They are letting us spec the xml files.

For XML being THE thing, it sure is proving to be a pain getting this all 
working.  Basically, I our netcf app is working under this scenario:

To receive data from sql server into ppc
(SQLserver data)->SQLStoredProcedure -->PPCdataset->SQLceDB

To send updated data from ppc into sql server
SQLceDB--> SQLStoredProcedure->(SQLserver data)


Similarly I need to remove the stored procedure call and replace it with XML 
import/exports.

Receive data from xml into ppc
XMLfile -->PPCdataset->SQLceDB

Send updated data from ppc into xml
SQLceDB--> XMLfile


I have been able to do a test by reading the sql server data into a dataset 
via the stored procedure (using a data adapter) - and then writing that out 
to XML [ ds.WriteXml("test.xml") ]

Ok, that gave me a test XML file to play with - but I can't even read that 
XML file in to a dataset now.  Trying to use:
  Dim XMLreader as New XmlTextReader(New StreamReader("test.xml")
  dsXML.ReadXmlSchema(XMLreader)
  dsXML.ReadXml(XMLreader)

Are there any sample programs out there that contain a sample XML file that 
gets read into a dataset, and then maybe even exports an xml file containing 
modified data?

I'm trying to do my homework - but dang.   It just seems that if XML is the 
thing these days, it would be easier than this.  Flat ascii files are sure 
easier and even make more sense to the naked eye.  ??

Thanks for any guidance. 


5.XML file that is read/written to disappears from server -- help wanted

6. Reading/Writing XML Datasource...

7. Read/write simple XML

8. xml file read write question



Return to xml

 

Who is online

Users browsing this forum: No registered users and 95 guest