|
I have two XMls having same node and different data(innertext)
I want to compare these two xmls and if there is any change then save the new one into the database
and if both are same then do not save the data
How can I compare these XML data?
say I have two XMLs
string xml1= originalDataXML;
string xml2= editedDataXML;
How can I compare these two in C# and ASP.NET 2.0?
|
|
|
|
|
You don't know how to compare two strings? How about String.Compare[^]
led mike
|
|
|
|
|
|
|
Don't delete your posts. This site is not here just for you. Others may benefit from your question and any replies given that solve the problem.
led mike
|
|
|
|
|
Hi all,
I have an xml with a lot of data. Currently all the data are transformed into one html page using xsl. It is displayed using an HTML control in VC++. This control has a particular height and so a vertical scrollbar will be displayed if the page is larger.
My requirment is that I need to split this page to multiple pages to avoid this scrollbar. And there should be "previous" and "next" buttons for showing each pages.
Could anybody direct me to the solution? I am newbie in xsl and html.
Thanks in advance
|
|
|
|
|
NS17 wrote: Could anybody direct me to the solution? I am newbie in xsl and html.
Well without having intimate knowledge of your XML that would be rather difficult. Understanding the XML, the nature of the Data in the XML and the HTML Page requirements are all required to even start thinking about how to proceed. Potentially you will also need to go fairly deep in reusing the browser control to deal with the interaction for next/back type behavior unless you are just going to create temporary files on a local drive.
led mike
|
|
|
|
|
Thank you for the replay...
led mike wrote: without having intimate knowledge of your XML
Actually the XML has values that can be shown as tables, most probably some numbers. The output is generally having tables with a number of rows. If the displayed data height exceeds the visible area, I need to break the table (which hits the bottom) and let the remaining parts be shown in the next page. If so, the data will be shown in more than one page.
led mike wrote: will also need to go fairly deep in reusing the browser control to deal with the interaction for next/back type behavior
I cannot do in such a way because I am updating a currently running project. Also no file is generated physically, but it is handled by the VC++ controls.
Thank you.
|
|
|
|
|
NS17 wrote: I cannot do in such a way because I am updating a currently running project.
I have no idea what that means
led mike
|
|
|
|
|
Actually my project contains many xsl and xml handling as I noted before. That is why I cant change the VC++ control for HTML behaviour right now. Instead of that I should manage the xsl and html template to get the expected results.
Also I dont have any experience in this area of xsl and html... I am doing a self study, that might be why I cant explain things better. Sorry.
Thank you for your reply.
|
|
|
|
|
Hi,
I have a problem with validation a list of different subclasses. The are all derived from one base class(ElementBase).
I want to make the schema future-proof by adding a placeholder.
Here a short example
< xs:element name="Elements">
< xs:complextype>
< xs:choice minoccurs="0" maxoccurs="unbounded">
< xs:element name="BaseElement" type="ElementBase" />
< xs:element name="Sphere" type="ElementSphere" />
< xs:element name="Cone" type="ElementCone" />
< xs:element name="Cylinder" type="ElementCylinder" />
HERE I need a placeholder
< /xs:choice>
< /xs:complextype>
< /xs:element>
My idea was to make another complex type with an any Parameter like followed.
< xs:complextype name="FurtherElements">
< xs:complexcontent>
< xs:extension base="ElementBase">
< xs:sequence>
< xs:any minoccurs="0" maxoccurs="unbounded" />
< /xs:sequence>
< /xs:extension>
< /xs:complexcontent>
< /xs:complextype>
But how do I put this into the choise statement? I still don't know the name of the future elements (but xs:element needs one: < xs:element name="" type ="FurtherElements"/>). Is there any workaround to solve this problem?
Thanks a lot
modified on Monday, June 9, 2008 4:53 AM
|
|
|
|
|
HI
anybody has a sample program (with VB or JAVA) to read from an XML file to a simple form (include a text field and a check-box or radio-button) and load dat of these controls and then save changes again on XML file by pressing a "save" button.
I need for old ASP (not ASP.NET)
thank you
|
|
|
|
|
I need to programmatically create XML storage files, and I've seen what people do in articles.
It seems that most people just use the XmlWriter class, manually writing low-level elements one at a time. However, I was wondering if there's a more elegant way to accomplish this task; for instance, a single function that says:
"Make a 'hello' node as the child of 'root'->'greetings'->'hi'"
where the 'hello' node is fully defined in a class before being inserted.
|
|
|
|
|
Use an XmlDocument, fill it, and use .WriteTo ?
|
|
|
|
|
jesarg wrote: It seems that most people just use the XmlWriter class, manually writing low-level elements one at a time. However, I was wondering if there's a more elegant way to accomplish this task; for instance, a single function that says:
"Make a 'hello' node as the child of 'root'->'greetings'->'hi'"
where the 'hello' node is fully defined in a class before being inserted.
Have you looked into Serialization? System.Xml.XmlSerializer
led mike
|
|
|
|
|
I have a very basic question. Please help.
I have a table:
Name Friend
Jane Rachelle
Jane Mark
Jane Bob
and I used
dt.WriteXml(sw);
I would like the output to be in this format:
<name>Jane
<friends>
<friend>Rachelle
<friend>Mark
<friend>Bob
I would just like Friend element/s to be inside Name element.
Please help. Thank you.
Gerri
|
|
|
|
|
Your subject asks about schema but your post does not, what do you want?
Also to post XML you need to check the check box on the posting page for ignoring HTML tags
led mike
|
|
|
|
|
Hi all, I hope someone can help. I'm new to XSL so this might be pretty straight forward.
I have a section of XML that looks something like this:
<PhysicalAddr><br />
<Line>Physical line 1</Line><br />
<Line>Physical line 2</Line><br />
<Line>Physical line 3</Line><br />
</PhysicalAddr>
I'm trying to transform this with <xsl:for-each select="Line"> but seeing as the <code<line>> tags have no children tags, I'm not sure how to return the contents of each by using the <code><xsl:value-of select="???"> element. In other words, what do I replace the ??? with?
Am I making my question clear enough and could anyone help perhaps?
|
|
|
|
|
You use a period:
<xsl:value-of select="."/>
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
|
Could someone please explain what the following XSD extract does:
<xsd:simpleType name="registration">
- <xsd:restriction base="xsd:string">
<xsd:pattern value="[0-9]{1,8}[A-Wa-w][TWXtwx ]?" />
<xsd:pattern value="[7-9][A-Wa-w][0-9]{5}[A-Za-z]" />
Thanks
|
|
|
|
|
hi,
I have been given a requirement in which they say: Look into how we can generate an XML Schema of an SQL Server 2005 Express Database. The first thing that came to my mind was that we can create a Typed DataSet in VS 2005 but I just wanna know if there is someother option available as well
Thanks in advance
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
Rocky# wrote: The first thing that came to my mind was that we can create a Typed DataSet in VS 2005
You mean the step that generates the schema that is used to generate the typed dataset?
Rocky# wrote: but I just wanna know if there is someother option available
I have not looked into it but I would guess there are plenty of other options. Since you posted 10 hours ago I won't bother Googling because you probably already have.
led mike
|
|
|
|
|
led mike wrote: You mean the step that generates the schema that is used to generate the typed dataset?
Yes exactly!
led mike wrote: Since you posted 10 hours ago I won't bother Googling because you probably already have.
lolz really good one u know! but I bet u wanna listen to that one as well, actually I need to research on this tommorow and I put the question here today so that may be I'd get some info while working parallel to my project
soooo I'll just google it out tommorow I guess, NO JUICE FOR ME!!
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
I want to use objectARX interface to read AutoCAD file and then convert the data record into xml file. Before it, I should define the various classes for the data record, i.e. line, block, etc. So I need at first convert the c++ classes to xsd format. Has anybody experience about it? Is there any adaptor which is made for it?
Thank you in advance.
|
|
|
|