|
Please help me to write code to establish the connection to SQL Server 2005 database in C#.net(VS 2005) windows application. Also I need to write se lect statements to retrieve data from the databse which is XML type.
Sanjeewani
|
|
|
|
|
Hello, I'm new to attributes. Attributes seem to solve a problem I have with my data representation. However, how are attributes stored in a database?
Specifically, I'm using VS'03 to build a typed data schema, wherein I create and populate some elements. I can use the SqlDataAdapter to load/retrieve from the dB, no problem. Now, I add attributes to the schema, how do I get them into the dB and what is the representation?
Thanks.
NYC Traveler
|
|
|
|
|
Hi everybody
I'm approaching xml schema language applied to custom
data files, but using diffgram schema too; I would like
to examine this schema.
Anybody knows where can I get from the internet? I
already gave a watch to some microsoft websites but I
don't find it...
thanks for any link you can submit me
FPT
|
|
|
|
|
Hi,
In one of my projects , i got a problem
<ExtensionInfo ><br />
<ObjectExtension><br />
<Extension Name="test123" ExtensionType="SymbolExtension" InheritedFromTagName="" / ><br />
<Extension Name="test123" ExtensionType="ScriptExtension" InheritedFromTagName="" / ><br />
</ObjectExtension><br />
<AttributeExtension / ><br />
</ExtensionInfo>
when i pass test123 ,get_nodeValue is returning SymbolExtension.
I have no clue to get ScriptExtension.
Can any one of you help me to get the ScriptExtension by using get_nodeValue .
Thanks in advance.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
NiceNaiduwhen i pass test123 ,get_nodeValue is returning SymbolExtension.
What exactly is get_nodeValue doing?
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
|
Ok, I never used that API but as far as I can see from the docs, you have to use a method like getElementsByTagName to select the Extension elements and then do any further work on the second element in the returned list. In the MSDN topic of getElementsByTagName an example is given that selects all media nodes, iterates through the node list and display the node value of every attribute for every node in the list. IXMLDOMDocument::getElementsByTagName[^]
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
am using the xml file to imoprt data to my Page but xsl style sheet is not applying to the WEb page my code is : (using ASP.NET)
Dim xmlPath As String = Server.MapPath("XMLFile.xml")
Dim xslPath As String = Server.MapPath("XSLTFile.xsl")
Dim fs As FileStream = New FileStream(xmlPath, FileMode.Open, FileAccess.Read)
Dim reader As StreamReader = New StreamReader(fs, Encoding.UTF8)
Dim xmlReader As XmlTextReader = New XmlTextReader(reader)
'Instantiate the XPathDocument Class
Dim doc As XPathDocument = New XPathDocument(xmlReader)
'//Instantiate the XslTransform Class
Dim xslDoc As XslCompiledTransform = New XslCompiledTransform()
xslDoc.Load(xslPath)
Dim sw As StringWriter = New StringWriter()
xslDoc.Transform(doc, Nothing, sw)
' //Close Readers
reader.Close()
xmlReader.Close()
Response.Write(sw.ToString())
Feroze
|
|
|
|
|
The code looks ok to me, so I guess the error is within the stylesheet. It would be helpful to see the XML and XSLT file (or at least some exemplary parts).
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
HI,
How can i transfer sql data to the xml file plsssss give me the solution
C.P.Desai
|
|
|
|
|
You can visit this web-page. I think this helpful.
http://www.15seconds.com/issue/001102.htm
SELECT store.stor_id as Id, stor_name as Name, sale.ord_num as OrderNo,
sale.qty as Qty
FROM stores store inner join sales sale on store.stor_id = sale.stor_id
ORDER BY stor_name
FOR XML <MODE>
* RAW Mode or AUTO Mode
|
|
|
|
|
i am using the xml file to imoprt data to my Page but xsl style sheet is not applying to the WEb page my code is : (using ASP.NET)
Dim xmlPath As String = Server.MapPath("XMLFile.xml")
Dim xslPath As String = Server.MapPath("XSLTFile.xsl")
Dim fs As FileStream = New FileStream(xmlPath, FileMode.Open, FileAccess.Read)
Dim reader As StreamReader = New StreamReader(fs, Encoding.UTF8)
Dim xmlReader As XmlTextReader = New XmlTextReader(reader)
'Instantiate the XPathDocument Class
Dim doc As XPathDocument = New XPathDocument(xmlReader)
'//Instantiate the XslTransform Class
Dim xslDoc As XslCompiledTransform = New XslCompiledTransform()
xslDoc.Load(xslPath)
Dim sw As StringWriter = New StringWriter()
xslDoc.Transform(doc, Nothing, sw)
' //Close Readers
reader.Close()
xmlReader.Close()
Response.Write(sw.ToString())
please tell me about the problem!
Feroze
|
|
|
|
|
Hi all,
How can I convert all the data that is present in SQL server in to XML format. If its big, then atleast provide me some link. Thank you.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
is there any easy way to get these RSS feeds on my website[which is collected from any feeder] and cutomizing them to blend in with my page without navigating to the providers page while clicking the link
A SIMILAR EXAMPLE CAN BE SEENED AT www.newkerala.com
how it works
can you plzzzz help me
RIYAM HUSSAIN
Sr.SOFTWARE DEVELOPER
INFORPARK, KOCHIN
|
|
|
|
|
Solution is to create XSLT sheets and transform RSS feeds with these stylesheets to fit your site's look'n'feel.
See:
http://www.codeproject.com/soap/reallymostsimplesyndctn.asp
-------------------------
Don't worry, be happy )
|
|
|
|
|
I want to send XML file as a DOM object from client to server.. server receive the DOM object..
plz tell how I can do that?? using VC++
|
|
|
|
|
hi,
iam trying to learn AJAX. i have a problem with xml file.the problem is i need to add some attributes to each tag in the xml file which i generate by writexml method of dataSet.
i tried to fill the dataSet with the adapter then i write it in an xml file but i need to re-format the xml file to add some attributes and change the order of tags.
all that because i wanna use CascadingDropDownList control from AJAXContoltoolKit. who use this control will understand my problem.thanks and i wish i explain my problem clearly.
thanks for any suggestions
|
|
|
|
|
Sounds like a job for XSLT. The .NET Framework provides classes for this in the System.Xml.Xsl namespace. If you want to get to know XSLT in general, take a look at this site: XSLT Tutorial[^]
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hi all,
I need to be parse the XML file. So, please send any light weight XML parser library in Visual studio 2005.
Already I have been tried one XML parser. But there is some memory problem would arrive whenever run my application. The name of that one is "Apache's Xerces C++ Parser" by Fengjun Lv.
Thanks in advance
|
|
|
|
|
You could use XmlDocument or Xmlreader ; both contained in the System.Xml namespace of the .NET Framework Class Library.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
How I can send XML packet over network? and How I can received that packet on server..
|
|
|
|
|
The XmlDocument.Load and XmlDocument.Save methods have overloads that take a Stream object, so you should be able to pass in a NetworkStream. Alternatively, you could use the XmlTextReader and XmlTextWriter . Both have a constructor that also takes a Stream object.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
I have an xml document where certain elements have attributes with generic names and values. Like this:
Data.xml
<DATA sport="football">
<ROW firstname="John" lastname="Doe" s1="130" s2="3" s3="43.3" />
</DATA>
And I have metadata which describes the data. The metadata is not in XML format so if there is an alternative to what I'm attempting to do, please let me know. But what I am trying to do is put the metadata in the following format:
Meta.xml
<METADATA>
<FIELDS sport="football">
<FIELD field="s1" name="RushingYards" />
<FIELD field="s2" name="RushingAttempts" />
<FIELD field="s3" name="RushingYardsPerCarry" />
....... blah, blah, blah .....
</FIELDS>
</METADATA>
I want to create a stylesheet that can use "Meta.xml" to transform Data.xml into this:
<DATA sport="football">
<ROW firstname="John" lastname="Doe" RushingYards="130" RushingAttempts="3" RushingYardsPerCarry="43.3" />
</DATA>
The part I don't know how to do is to tell the XslTransform object to transform Data.xml and use Meta.xml as variable input. Can I simply pass Meta.xml in as a parameter to XslTransform?
|
|
|
|
|
I solved it myself - I ended up using an XmlReader to read Data.xml. Then instead of using Meta.xml I just used the metadata in it's original tabular format. As the process reads Data.xml it looks for ROW elements and checks the names of the attributes against the metadata. While reading Data.xml I create an XmlTextWriter to correspond to the XmlReader. If I need to change the attribute name or value I substitute, otherwise I just output the data from the XmlReader.
|
|
|
|
|
I've made a C# application which modifies XML files, but sometimes the resulting file contains the BOM header (EFBBBF hex as first three characters) which the systems which need to take the updated file as input do not accept.
I know I could probably open the file after modification and remove the characters, but that seems like a hack.
Is there a way to specify the encoding to be something different (or any other way) so that it doesn't create this? The code I'm currently using to open the file is:
try<br />
{<br />
xmlDoc = new XmlDocument();<br />
xmlDoc.Load(Filename);<br />
<br />
xpathNav = xmlDoc.CreateNavigator();<br />
return true;<br />
...
|
|
|
|