|
Sounds like the XmlSerializer is what you're looking for.
"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
|
|
|
|
|
Thanks - what I did in the end was read the file into an XMLDataDocument object instead of a class structure as it means I can use XPath/XQuery and also have the power of the DatatSet object as well. Once I created the schema file (by loading the XML file into VS2005 and choosing Create Schema from the XML menu) the code was simply as follows:
Public Sub LoadXMLConfig()<br />
<br />
'Read the XML configuration file<br />
dataDoc = New XmlDataDocument()<br />
dataDoc.DataSet.ReadXml(My.Settings.XMLConfigFile)<br />
<br />
End Sub
Just thought I'd post this in case anyone else is wanting to do this sort of thing and comes across this thread.
Mike
|
|
|
|
|
In Word2007 the document is saved as *.docx, which unzips to reveal a group of XML files, including fontTable.xml. If the fonts were embedded that table will include a fontkey for each embedded font, something like:
4FC99FC9-34EB-48D7-B509-17C906D3B8E1
When the docx file is unzipped it includes also a font-like file for each embedded font, with an extension .odttf . This differs from the usual ttf file only in the first 32 bytes, and it is obvious that the application of the key to these 32 bytes will transform it so as to give a valid ttf font file. For that it is necessary to read the key in reverse direction, E1B8 D306... Some times it is only a matter of getting the difference between these words and the corresponding words in the odttf file. However I cannot see the full solution.
Does anyone know how ? I don't see why MS would want to conceal it.
Raymond Mercier
|
|
|
|
|
Hi all.
In my application I am downloading an XML file from the server.
But I don’t want the user to be able to read its contents.
So my question is….
How can I encrypt an XML file and decrypt it while reading its contents through code?
OR
Can I hide some of the tags from an XML file so that user will not see those when he opens that XML?
Thanks
Rakesh Thakur
|
|
|
|
|
Rakesh_Thakur wrote: Can I hide some of the tags from an XML file so that user will not see those when he opens that XML?
No
Rakesh_Thakur wrote: I am downloading an XML file from the server.
What server? Web Server? If Web Server the most common way is to use SSL. Otherwise look at the Crypto API.
led mike
|
|
|
|
|
Hi All,
I use VC.NET and could anyone suggest me how to auto upgrade the XML files at the time of software upgradation..
Thanks..
|
|
|
|
|
Make an Installer Project
led mike
|
|
|
|
|
I was asking how can we develop it and not by Installer Project! Whether it is using XSLT or C#.Which is the preferred and a better way to develop?
|
|
|
|
|
zxc89 wrote: I was asking how can we develop it and not by Installer Project!
zxc89 wrote: software upgradation
I am not familiar with the word "upgradation". If you don't want an installer for updating the components of the application, what do you want?
led mike
|
|
|
|
|
whenever a software is upgraded to another version, the xml files should also be upgraded to that version.
So what i meant was that all the xml files should be upgraded to another version with any changes to its attributes or element values at the time of s/w upgradation.
|
|
|
|
|
zxc89 wrote: whenever a software is upgraded to another version
zxc89 wrote: and not by Installer Project!
What mechanism are you using to upgrade the software if not an installer?
led mike
|
|
|
|
|
I'm assuming zxc89 means that when the app starts on the user's machine it would contact a web server to look for a newer version of the app then download the updated version including the updated XML files... this is what I need to do in my app as well so I'd also like to know what the options are for doing this.
If this is not what you mean zxc89 then you need to tell us what you mean!
Mike
|
|
|
|
|
nzmike wrote: I'd also like to know what the options are for doing this.
Far too many to list. With each one twisting and turning the issues involved into a jigsaw puzzle. Most likely the simplest and safest (robust) approach would be to use Bits. You can get started by reading this article[^].
led mike
|
|
|
|
|
Hello,
What is the best way to get an XmlDocument from an XmlNode?
I have a document that I run an XPath query against that returns an XmlNode. I want to create an XmlDocument from the XmlNode (using the XmlNode as the root node of my new document).
I could create a new XmlDocument, then parse the XmlNode adding each node to the document, but I want to know if there's a better way to do this before I proceed.
It seems like this would be a common problem.
Any suggestions?
Thanks!
Ian
|
|
|
|
|
Maybe you can use the XmlDocument.LoadXml method and pass in the result of XmlNode.OuterXml .
"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
|
|
|
|
|
Great idea. Thanks for the help!
|
|
|
|
|
Use XmlDocument.ImportNode.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
How to read data from xml file and writing data in a Xml file and to use this in implementing in windows application using C#.net.that means how can I write data into Xml file from a FORM and read data from xml file and use that data in windows FORM.
Thanx
Rashmita Devi
|
|
|
|
|
In other words, how to use XML from C#. Take a look at System.Xml namespace, and come back with more specific question.
You can start here[^].
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
|
|
|
|
|
MSDN says XmlSchemaObjectTable has a 'Item' property but when I try to use it the compiler informs me that XmlSchemaObjectTable DOES NOT have an 'Item' property. Looking at the metadata shows that the property doesn't exist. There are also several methods mentioned by MSDN that are not showing up when I look at the metadata for XmlSchemaObjectTable.
I know it's not entirely unusual to find mistakes in MSDN documentation, but the strange thing is that I cannot find a single reference to the 'Item' property being obsolete or deprecated or just plain incorrect.
Does anyone have any information on this property or insight into the XmlSchemaObjectTable class? The thrust of what I'm trying to do is parse an Xml Schema to construct dynamic properties in a PropertyGrid. The properties are described as xsd:attribute elements in the schema.
Any takers?
Thanks a bunch!
Ian
|
|
|
|
|
If you're using C# the Item property maps to an indexer, so the syntax looks like accessing an array element.
XmlSchema schema = new XmlSchema();
XmlSchemaObjectTable objectTable = schema.Attributes;
XmlSchemaObject obj = objectTable[new XmlQualifiedName()];
"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
|
|
|
|
|
Thanks for your reply. I'll give this a shot!
|
|
|
|
|
hi,
I am developing RSS for online shopping website using XML .
I want to display different banners of different shops using XSL.
I'm getting same image that is of first shop for all the shops i want to get image related to every shop.Please guide.
The part of xml code is as follows:
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template match="/">
-
-
- <title>
<A>RSS for Shop</a>
-
-
-
RSS FOR SHOP
-
- <xsl:for-each select="NewDataSet/Table">
- <xsl:choose>
- <xsl:when test="ShopID[. = 3]">
-
- -
<xsl:text>SHOP TITLE:
-
-
<xsl:apply-templates select="ShopTitle">
-
-
<xsl:text>Product NAME:
-
-
<xsl:apply-templates select="ProductName">
-
-
<xsl:text>Product Description:
-
<xsl:apply-templates select="Description">
yog
hui gfgh kgdgrt njjn hjgkn
|
|
|
|
|
Please edit your post and check "Ignore HTML tags in this message (good for code snippets)"...
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
|
|
|
|
|
Hello,
I have developed a Web service and a PDA application. The Web service and SQL database are on the same server.
The client will use the PDA application and access the web service to get data on customers.
The web service, PDA application, and SQL server have all be developed and are working using the localhost, local network. By adding the web reference.
My problem is when I want to add the web reference from the Internet. This is because the clients will be on the road or at a clients office. And will need access to their data.
I have added the web reference in the normal way. Right click | Add reference. From the Internet I can access the server and add the web reference. However, the problem is that wsdl file is never included.
Some tests i have done.
Test 1
Accessing the web service when adding the web reference from the local computer, or local network. The following files are included: reference.map, service.disco, service.wsdl.
Test 2
Access the web service from the Internet when adding the web reference.
The following files are included: reference.map, service.disco. THERE IS NO service.wsdl.
Test 3
If I access the web service directly from a browser, I can see the list of web methods and descriptions.
Test 4
If i acess the web service from the Internet when adding the web reference like the following: http://MyServer/service.asmx?wsdl. The only file that is included is the service.wsdl.
I have created another simple web service that just displays the hello world. This has the same problem as above, but maybe you can use it for testing my web service.
http://cf01.no-ip.com:8000/webservice1/service.asmx
However, the above link works, but sometimes is offline.
If you can give me any advice or help with this problem I would be most grateful,
Thanks in advance,
Steve
|
|
|
|