|
The xml did not display correctly above, therefore here is an encoded version
<?xml version="1.0" encoding="utf-8"?>
<SPThemes xmlns="http://tempuri.org/SPThemes.xsd">
<Templates>
<TemplateID>none</TemplateID>
<DisplayName>No Theme(Default)</DisplayName>
<Description>Description</Description>
<Thumbnail>../images/thnone.png</Thumbnail>
<Preview>../images/thnone.gif</Preview>
</Templates>
<Templates>
<TemplateID>af......etc
|
|
|
|
|
Assumption: both my server and client will use
System.Runtime.Remoting.RemotingConfiguration.Configure(configFile)
to read configuration file
Following are couple of ways I tried, none of them works:
(1)SERVER side:
<configuration>
<system.runtime.remoting>
<application>
<channels>
<channel ref="ipc" portName="IpcChannelOne"/>
<channel ref="ipc" portName="IpcChannelTwo"/>
</channels>
<service>
<wellknown type="MyServer.RemoteObjectOne, ServerAssembly"
objectUri="RemoteObjectOne.rem"
mode="Singleton" />
<wellknown type="MyServer.RemoteObjectTwo, ServerAssembly"
objectUri="RemoteObjectTwo.rem"
mode="Singleton" />
</service>
</application>
</system.runtime.remoting>
</configuration>
CLIENT side:
<configuration>
<system.runtime.remoting>
<application>
<client>
<wellknown type="MyInterface.IRemoteObjectOne,
InterfaceAssembly"
url=ipc://IpcChannelOne/RemoteObjectOne.rem"/>
<wellknown type="MyInterface.IRemoteObjectTwo,
InterfaceAssembly"
url="ipc://IpcChannelTwo/RemoteObjectTwo.rem"/>
</client>
</application>
</system.runtime.remoting>
</configuration>
(2)SERVER side
<configuration>
<system.runtime.remoting>
<application>
<channels>
<channel ref="ipc" portName="IpcChannelOne"/>
</channels>
<service>
<wellknown type="MyServer.RemoteObjectOne,ServerAssembly"
objectUri="RemoteObjectOne.rem"
mode="Singleton" />
</service>
<channels>
<channel ref="ipc" portName="IpcChannelTwo"/>
</channels>
<service>
<wellknown type="MyServer.RemoteObjectTwo,ServerAssembly"
objectUri="RemoteObjectTwo.rem"
mode="Singleton" />
</service>
</application>
</system.runtime.remoting>
</configuration>
CLIENT side:
no change
(3)SERVER side:
<configuration>
<system.runtime.remoting>
<application>
<service>
<channels>
<channel ref="ipc" portName="IpcChannelOne"/>
</channels>
<wellknown type="MyServer.RemoteObjectOne, ServerAssembly"
objectUri="RemoteObjectOne.rem"
mode="Singleton" />
</service>
<service>
<channels>
<channel ref="ipc" portName="IpcChannelTwo"/>
</channels>
<wellknown type="MyServer.RemoteObjectTwo, ServerAssembly"
objectUri="RemoteObjectTwo.rem"
mode="Singleton" />
</service>
</application>
</system.runtime.remoting>
</configuration>
CLIENT side:
no change
(4)SERVER side
<configuration>
<system.runtime.remoting>
<application>
<service>
<channels>
<channel ref="ipc" portName="IpcChannelOne"/>
</channels>
<wellknown type="MyServer.RemoteObjectOne, ServerAssembly"
objectUri="RemoteObjectOne.rem"
mode="Singleton" />
<channels>
<channel ref="ipc" portName="IpcChannelTwo"/>
</channels>
<wellknown type="MyServer.RemoteObjectTwo, ServerAssembly"
objectUri="RemoteObjectTwo.rem"
mode="Singleton" />
</service>
</application>
</system.runtime.remoting>
</configuration>
CLIENT side:
no change
Please advise what is the right way to create both client and server side
configuration files.
Your help is highly appreciated!
Hang
|
|
|
|
|
Can you name a commercially available tool for XML-FO printing and forms design?
I see different offerings on the Web, such as Crane Softwrights Ltd, but I was hoping for a word-of-mouth endorsement from somebody.
thanks
|
|
|
|
|
Hi,
Using the XmlDocument class, when i try to load a xml file that doesn't contain the root node, only the '?xml version="1.0" encoding="utf-8"?' tag, i get an error.
I load the file like this:
XmlDocument doc = new XmlDocument();
doc.Load(@"C:\Myfile.xml");
Should XmlDocument class be used to open files with an existing root node?
|
|
|
|
|
Heinz Suez wrote:
Should XmlDocument class be used to open files with an existing root node?
Yes, because every XML document MUST have exactly one root element. ( see XML spec, http://www.w3.org/TR/2004/REC-xml11-20040204/#NT-document[^] )
How to do it? Create empty XmlDocument and add root element to it. Then read XML file (e.g with TextReader ) and set InnerXml property of root element to this loaded xml (it must be loaded into string of course).
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
i have posted questions about SOAP,but none of them are ansered
i also see some other SOAP submitions which are not answered..
codeproject don't even provide a messageboard for it
so now i'll do it my self..
thanks codeproject for inspiring me with your unsportive nature toward SOAP
otherwise you peple are doing great
good day
sagar
love is photogenic, it requires a dark to develope
|
|
|
|
|
You generally get what you pay for. Here, you get more, but not enough to complain if something does not get answered. You seem to have no idea how this site works - the articles are submitted by readers, not by the site owners. The people helping you are not paid by CP, we're just coders like you.
You've been asking the same ( complex ) question about SOAP over and over. If you want to call a dll from SOAP, you need to write an app that communicates with your web service, and with the dll. SOAP is XML over HTTP, you can't send a SOAP Envelope which magically runs a program on the other end.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi, can anyone help me out with encrypting elements in a XML document using an algorithm like AES for example? I use VS.NET(C#) 2003 and apparently 2005 is easier but different? I'm kinda new to XML so please excuse me. Any information such as links to tutorials or the code itself will help.
Thanks
|
|
|
|
|
Donnie13 wrote:
Hi, can anyone help me out with encrypting elements in a XML document using an algorithm like AES for example?
I am not sure exactly what you are asking...
Why would the fact that its an XML document be any different in the way you encrypt? If you are asking about using AES itself you might find this[^] useful.
Quran
Translation
Intro
Discover
|
|
|
|
|
Good Day,
I'm trying to make a stylesheet that will sum up values and return the sum, this is what I have so far :
<xsl:template name="SumProducts">
<xsl:param name="pNodes" select="/.."/>
<xsl:param name="cNodes" select="/.."/>
<xsl:param name="result" select="0"/>
<xsl:choose>
<xsl:when test="$pNodes">
<xsl:call-template name="SumProducts">
<xsl:with-param name="pNodes"
select="$pNodes[position()!=1]"/>
<xsl:with-param name="cNodes"
select="$cNodes"/>
<xsl:with-param name="result"
select="$result
+ $pNodes[1]/Count * $cNodes[Project=$pNodes[1]/Project]/Cost"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$result"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
The problem I am having is "$pNodes[1]/Count * $cNodes[Project=$pNodes[1]/Project]/Cost" if I remove the second part of the expression (starting with $cNodes) it works (just sums up the project count) However when I try and mult. by the cost the value returned is always NaN. I have a feeling that I am missing something oblivous. Can any one help? below is the xml that goes with the stylesheet
thanks,
james
<NewDataSet>
<Table1>
<Project>Box Maker</Project>
<Count>175</Count>
<AuthorCount>71</AuthorCount>
</Table1>
<Table2>
<Author>Bill Smith</Author>
<Address>blah blah</Address>
<Date>1/20/2002</Date>
</Table2>
<Table3>
<Project>Shopbot-O-Graph</Project>
<Cost>0</Cost>
</Table3>
</NewDataSet>
|
|
|
|
|
Hi,
As you might know i'm a newbie to xml with c#, i have been surfing the net to find examples for creting nodes. I found this useful stuff in http://www.csharphelp.com/archives/archive199.html[^]
This thing works fine BUT if you open the created file with notepad you'll notice that all nodes are written in the same line.
Does anyone know how to create nodes and xml stuff in a tree way?
Thanx
-- modified at 22:54 Tuesday 6th September, 2005
|
|
|
|
|
Try myDoc.PreserveWhitespace = true before calling the save method.
Actually, the docs say this:
If PreserveWhitespace is true before Save is called, white space in the document is preserved in the output; otherwise, if this property is false, XmlDocument auto-indents the output.
Which makes me think that it needs to be set to false, to get auto indenting.
Christian Graus - Microsoft MVP - C++
-- modified at 22:58 Tuesday 6th September, 2005
|
|
|
|
|
Hi Christian, thanx for your help. I tried PreserveWhitespace with true and false, i put it before creating the nodes and after. The app compiles and run with no problem in all cases but with no effect in any of them, the file is the same.
|
|
|
|
|
Looking back through some old code, I did this:
public static string MakePretty (string sXML)
{
StringBuilder sbDocString = new StringBuilder();
StringWriter swControlWriter = new StringWriter(sbDocString);
XmlTextWriter oDocWriter = new XmlTextWriter(swControlWriter);
oDocWriter.Formatting = Formatting.Indented;
XmlDocument doc = new XmlDocument();
doc.LoadXml(sXML);
doc.Save(oDocWriter);
return sbDocString.ToString();
}
This uses the fact that the XmlTextWriter can format XML as indented, and can work on a stream.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi Christian,
It worked! the XmlTextWriter works great, thanx man, i really apreciate it.
Thanx for your help.
Heinz
|
|
|
|
|
Hi all,
I've never worked with xml before until i started to write apps in C#. I use xml for config files and i want to know how many root nodes a xml file can have? I've seen in other aplications' xmls and they have always one, i'm not really sure about this so i posted this thread. Child nodes a root node can have many as you want, i know that.
Thanx
|
|
|
|
|
Heinz Suez wrote:
how many root nodes a xml file can have
One, hence the term 'root node'.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Visit www.w3schools.com
They've got great tutorials on XML, XML applications & software.
|
|
|
|
|
|
Hi,
My work is being done on Visual C++ 2002, MSXML 3.0.
I am using the "save" method to write the XML document data to file. How does one set the writing to print each node on a different line instead of the entire data on one line?
thanks
|
|
|
|
|
i'm a xml newbie.
i'm reading a book about XSLT, here is a paragraph i can't understand
XM+L Namespaces 1.1 became a Recommendation on 4 February 2004, and the XSLT 2.0 specification makes provision for XSLT processors to work with this version, though it isn't required. Apart from the largely cosmetic change from URIs to IRIs mentioned earlier, the main innovation is the ability to undeclare a namespace, using a namespace undeclaration of the form «xmlns:prefix=""». This is particularly intended for applications like SOAP messaging, where an XML payload document is wrapped in an XML envelope for transmission. Without namespace undeclarations, there is a tendency for namespaces used in the SOAP envelope to stick to the payload XML when this is removed from the envelope, which can cause validation failures and other problems. For example, it can invalidate a digital signature attached to the document.
what's xml payload?
|
|
|
|
|
The payload is just the XML document that the SOAP envelop exists to deliver. It's no different from any XML document.
HeartFriend wrote:
Without namespace undeclarations, there is a tendency for namespaces used in the SOAP envelope to stick to the payload XML when this is removed from the envelope, which can cause validation failures and other problems. For example, it can invalidate a digital signature attached to the document.
This means if your xml does not use namespaces, it will inherit the SOAP namespace, and this will cause XSD's to fail, etc.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi Friends,
I have to xml files with on common field them.
How can I display data from both the file using dataview and dataset.
Plz send me reply soon. Its very urgent.
Thank u all in advance.
|
|
|
|
|
Not all xml file can be shown on the grid, It has to be in proper schema, or manually you have to file in a DataTable of a DataSet.
Whenever a DataSet is writen into a xml file, it format the xml file in a recognized format, and preferable with its schema. The same xml file can be read into a DataSet. And at last , DataSource property of DataGrid can be set to that DataSet to show the xml file.
Refer : DataSet.Load(), DataSet.WriteXml() for further information.
love2code
|
|
|
|
|
Hi,
Thanx for ur Reply.
U suggested a good way to user xml schema.
I am using schemas to store data in xml file.
I think there are some methods using which we can put a relation ship between two tables in xml file.
But I dont know how use them properly.
If u know this way then plz let me know.
Thank u again.
|
|
|
|