|
|
thanks..
|
|
|
|
|
If i've a huge xml file and i want copy that data into sql server ce table. How can i do to store it faster?
|
|
|
|
|
Hai,
my xml format:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="PersonalDetails.xsl"?>
<!-- Edited by XMLSpy® -->
<PersonalDetails>
<Record>
<Name input="false">
<value>Saraswathi</value>
</Name>
<Address input="true">
<value>KML</value>
</Address>
<Age input="false">
<value>56</value>
</Age>
<Sex input="false">
<value>F</value>
</Sex>
<DOB input="false">
<value>24-07-1952</value>
</DOB>
</Record>
<Record>
<Name input="false">
<value>Latha</value>
</Name>
<Address input="false">
<value>KML</value>
</Address>
<Age input="false">
<value>28</value>
</Age>
<Sex input="false">
<value>F</value>
</Sex>
<DOB input="true">
<value>24-07-1980</value>
</DOB>
</Record>
<Record>
<Name input="false">
<value>hari</value>
</Name>
<Address input="false">
<value>KML</value>
</Address>
<Age input="false">
<value>58</value>
</Age>
<Sex input="true">
<value>M</value>
</Sex>
<DOB input="false">
<value>24-07-1950</value>
</DOB>
</Record>
</PersonalDetails>
And my xsl of that xml is:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Edited by XMLSpy® -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method='html' version='1.0' encoding='UTF-8' indent='yes'/>
<xsl:template match="/">
<html>
<body>
<h2>Personal Details</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th align="left">Name</th>
<th align="left">Address</th>
<th align="left">Age</th>
<th align="left">Sex</th>
<th align="left">DOB</th>
</tr>
<xsl:for-each select="PersonalDetails/Record">
<xsl:sort select="Name"/>
<tr>
<td>
<input type="text">
<xsl:attribute name="id">
<xsl:value-of select="Name"/>
</xsl:attribute>
<xsl:attribute name="name">
<xsl:value-of select="Name"/>
</xsl:attribute>
<xsl:attribute name="value">
<xsl:value-of select="value"/>
</xsl:attribute>
</input>
</td>
<td>
<xsl:value-of select="Address"/>
</td>
<td>
<xsl:value-of select="Age"/>
</td>
<td>
<xsl:value-of select="Sex"/>
</td>
<td>
<xsl:value-of select="DOB"/>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
I got the textboxes in the name field..
but the output(Name) didn't have the value....
|
|
|
|
|
Hi all, I've used the VS XSD tool to handle the XML input/output. All seems well, however; the XML that needs to be delivered is on a different technology platform and it can't understand self closing tags like so: < myelement />. It only understands < myelement >< /myelement >.
My problem is that I can't seem to enforce this using the XSD. Is there a way to do this? This happens on empty elements. I tried setting the default value to "" or " " and that didn't do the trick.
Thanks all in advance.
|
|
|
|
|
Ok I found one solution:
1) Don't return the tag at all if element is empty.
LOL the obvious right. It's very silly for a parser not to understand self closing tags, but it's our client's app that is going to read our generated XML. While this works, I'm still very interested on other solutions as well.
Thanks all in advance.
|
|
|
|
|
Anyone knowledgeable with transforms? Is there a quick way to convert all of the True/False entries our VB developers used to true/false so I can serialize/deserialize?
Thanks!
ed
ed
~"Watch your thoughts; they become your words. Watch your words they become your actions.
Watch your actions; they become your habits. Watch your habits; they become your character.
Watch your character; it becomes your destiny."
-Frank Outlaw.
|
|
|
|
|
Hi,
I have the following sample Data.xml
<Company>
<Department>
<dept>Sales</dept>
<dept>Tech</dept>
</Department>
<Branches>
<Location>US</Location>
<Location>IND</Location>
</Branches>
</Company>
I want to add a new node say <dept>HR</dept>
in the Department Section.
Please help me,how we can do this using C#.
|
|
|
|
|
|
Hai
How to write a xsd for the XML like as followa
<xdm:name>
<xdm:firstname>xxxxx</xdm:firstname>
<xdm:middlename>yyy</xdm:middlename> <xdm:lastname>hhhhh</xdm:lastname>
</xdm:name>
xml node name have ful colon
Please help me
Thanks & regards
vicky0000000
|
|
|
|
|
I'd like to use XSLT stylesheets to transform XML data rendered by Reporting Services. Reporting Services handled the stylesheets alright till I tried to import some external templates into the stylesheets. The error message was 'Cannot load XSLT specified at file name. Resolving of external URIs was prohibited.'.
Does anyone know how to make Reporting Services load the external XSLT templates without error?
Many thanks
|
|
|
|
|
Hello,
I was trying to load data from xml files to SQL Server tables.
I am using XMLTextReader to read from the files. my code's working and loading information to two tables. Except, few fields.
They show no values when read - even though the file contains values for them.
I notice all of them are either unsignedByte or unsignedInt type in the xml schema.
I changed them to strings just to test, but it's doing the same.
I think the datatype is not making any difference, but these elements don't have any attributes and the values are directly in the tags.
So, could be I'm missing something. Here's part of my code:
while (reader.Read())
{
switch (reader.NodeType)
{
case XmlNodeType.Element:
if (reader.Name.ToLower().Equals("decimals"))
{
dec = reader.Value;
}
.....
break;
case XmlNodeType.Text:
...nothing
break;
case XmlNodeType.EndElement:
break;
}
}
Any idea, what's wrong?
Thanks.
modified on Monday, August 11, 2008 4:42 PM
|
|
|
|
|
Respected Members,
I am in final year of engineering. We are suppose to create a project this year. I gave it a lot of thought but am short of ideas. Can anyone please help me out. Topics like Smart building, Mobile Messenger, and couple of other were rejected by my professor. The project should be big and should be completed within 7-8 months. Technology i am interested in is Java, .Net, XML and then others. Please help me.
Thank you.
kashyap
|
|
|
|
|
I am using LINQ To XSD to parse through an SVG XML file.
var s = svg.Load("rect.xml");
In order to select all rect objects i do
var q = from x in s.rect
select new { x };
In order to select all circle objects i do
var q = from x in s.circle
select new { x };
Can you tell me a query which would give me both rect and circle objects simultaneously.
Thanks in Advance
|
|
|
|
|
I got it
var s = XDocument.Load("rect.xml");
var q = from x in s.Descendants()
select new { x };
XNamespace ns = "http://tempuri.org/svg11-flat-20030114";
foreach (var itm in q)
{
if (itm.x.Name == ns + "rect")
{
rect re = (rect)itm.x;
Console.WriteLine(itm.x.Name.ToString());
}
if (itm.x.Name == ns + "desc")
{
rect re = (rect)itm.x;
Console.WriteLine(itm.x.Name.ToString());
}
}
|
|
|
|
|
Hi,
I have an XML File that looks like this:
<cases>
<case>
<caseid>1-111222
<notes>
<note>
<notecreated>30/07/2006
<notecontent>Some Description here...
<note>
<notecreated>31/07/2006
<notecontent>Another Description here...
How can I loop through the abovementioned XML file and list all the NoteContents for the specific CaseId in a GridView? The Above XML has two notes related to the CaseId.
Many Thanks!!!!
Illegal Operation
|
|
|
|
|
This bloody website stripped my XML elements!! Please let me know if you want to see the elements then I will mail it to you seeing that Code project is becoming more like a Microsoft type operation!!
Illegal Operation
|
|
|
|
|
<?xml version="1.0"?>
<nodes>
<node id="001">information</node>
</nodes>
Did you have "Auto-encode HTML when pasting?" checked?
Also, your question seems to be more of a .NET question than a XML question.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Hi,
I've had people e-mail and open XML files (in Vista) and have them view/revert back to the original install file/data.
- Open XML file in Notepad, the data shown is the original install data.
- E-mail XML file, the data is reverted to original install data.
- Open same XML file in Internet Explorer, the file shows up-to-date data.
I run Vista and I don't have this problem. Can anyone shed some light on this issue?
thanks,
Ron
|
|
|
|
|
Ron, I guess you posted this here because the file happens to be XML. I can assure you that there is nothing specific to XML technology that would account for this. Moving on.
myNameIsRon wrote: revert back to the original install file/data.
- Open XML file in Notepad, the data shown is the original install data.
You provided no information that would enlighten us about this "install", so once again, that doesn't tell us anything useful. You also provided no information about how this "original" file has been modified so listing all the ways you open it and see the original data without providing any clue about how it is supposedly modified, wait for it, doesn't tell me anything useful.
Based on what you posted I can not eliminate the users as the problem in every one of your scenarios.
myNameIsRon wrote: - Open XML file in Notepad, the data shown is the original install data.
User opened the wrong file.
myNameIsRon wrote: E-mail XML file, the data is reverted to original install data.
User emailed the wrong file.
myNameIsRon wrote: Open same XML file in Internet Explorer, the file shows up-to-date data.
Same as what? That statement doesn't even have enough information to understand. If you meant the same XML file they emailed in the previous step, then the first point is still valid, they sent the wrong file.
led mike
|
|
|
|
|
HI Friends,
I have a requirement to combine two xml files having different schemas to produce one xml file .Plz find the xml structures below:
The input XML is in the form
<EMPLOYEE>
<EMPFNAME>ANIL</EMPFNAME>
<EMPLNAME>JOSHI</EMPLNAME>
<EMPCODE>213</EMPCODE>
<MANAGEREMPCODE>211</MANAGEREMPCODE>
<SALARY>5000</SALARY>
<DEPT>FINANCE</DEPT>
</EMPLOYEE>
Assume that for each Employee in the company there is a XML of the structure above lying in a source folder.We have to read all the XMLs and create a single XML of the structure as below.
<COMPANY>
<DEPT NAME='FINANCE'>
<MANAGER>AJIT MAHUT</MANAGER>
<EMPLOYEE>ANIL JOSHI</EMPLOYEE
<EMPLOYEE>SRIKANTH SINGH</EMPLOYEE>
<EMPLOYEE>KAMAL ADNAN/EMPLOYEE
</DEPT>
<DEPT NAME='MIS'>
<MANAGER>SAM PITRODA</MANAGER>
<EMPLOYEE>ANIL KAPOOR</EMPLOYEE>
<EMPLOYEE>MANGAL PANDEY</EMPLOYEE>
<EMPLOYEE>R MADHAVAN</EMPLOYEE>
</DEPT>
</COMPANY>
How will I do this? How can we do this using ADO.net ?
Plz direct me.
Regards
A Sunil
|
|
|
|
|
Hi all!
I have created an XLS file but I am confused over a particular part of the language syntax.
If I want to sort by an element attribute I can do the following (and it works):
<xsl:sort-by select="@columnName" order="ascending" data-type="text" /> I want to add a paramater which allows me to input which column is to be sorted by. So I tried the following:
<xsl:param name="sortColumn" />
<!-- Other XSL stuff goes here... -->
<xsl:sort-by select="$sortColumn" order="ascending" data-type="text" /> But this did not work, so I tried the following which also did not work:
<xsl:param name="sortColumn" />
<!-- Other XSL stuff goes here... -->
<xsl:sort-by select="@$sortColumn" order="ascending" data-type="text" /> Could someone please advise me on how to do this?
To offer some clarity the input XML documents are structured as follows:
<root>
<entry columnA="value1" columnB="value2" columnC="value3" />
<entry columnA="value4" columnB="value5" columnC="value6" />
<entry columnA="value7" columnB="value8" columnC="value9" />
</root>
Many thanks!
Lea Hayes
modified on Sunday, August 3, 2008 9:30 PM
|
|
|
|
|
Hi all,
I have finally worked out how to achieve what I need. For those interested the syntax to get the value of an attribute by paramater is:
@*[name() = $sortBy] where $sortBy is the name of the paramater.
Hope this is of use to someone!
Lea Hayes
|
|
|
|
|
I've a xml file which contains some spaces that i need to display in html when transform using xsl
sample xml file
<root>
<child name="The quick brown fox jump over the lazy dog"/>
</root>
As you see in the above sample xml, it contains lots of spaces that i need to display same in html. how do i do that?
The issue is in html it render as
The quick brown fox jump over the lazy dog.
instead of
The quick brown fox jump over the lazy dog.
Is there any way by which modifying the xsl gives me the same result. Any help is highly appreciated.
|
|
|
|
|
Replace each space with ?
Regards,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
|
|
|
|