|
The C version: http://downloads.sourceforge.net/vtd-xml/c_tutorial_by_code_examples.zip?use_mirror=easynews
The C# version: http://downloads.sourceforge.net/vtd-xml/CSharp_tutorial_by_code_examples.zip?use_mirror=superb-east
The Java version: http://downloads.sourceforge.net/vtd-xml/Java_tutorial_by_code_examples.zip?use_mirror=superb-east
Schemaless Java-XML databinding with VTD-XML
http://www.onjava.com/pub/a/onjava/2007/09/07/schema-less-java-xml-data-binding-with-vtd-xml.html?page=last&x-showcontent=text&x-maxdepth=0
Index XML documents with VTD-XML
http://webservices.sys-con.com/read/453082.htm
Improve XPath Efficiency with VTD-XML
http://www.devx.com/xml/Article/34045
|
|
|
|
|
Hi all,
My question is very simple;
I have two arrays :
double[] arr1 = new double[] {1,2,3};
double[] arr2 = new double[] {10,20,30};
I want to store to and than read these arrays back from an XML file.
Could someone please send a small piece of code written in C#.
Thanks.
Cengiz EKEN.
|
|
|
|
|
ceken wrote: I want to store to and than read these arrays back from an XML file.
Could someone please send a small piece of code written in C#.
That's not how things work here. We don't do your work for you.
Anyway, you need to be more specific about what you want to do. How should your XML be structured?
I suggest that you do some more research, attempt to solve the problem yourself and post again if you encounter any further difficulties.
I've just noticed that you posted the same message[^] 2 days ago and were given some help. Why have you posted it again? Why have you failed to act upon the advice you had previously received?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hi,
Regarding the help posted 2 days ago, The solution offered in that transaction was not the way that i need, because I used that method before.
As for your questions;
<br />
<code><br />
<duttest><br />
<test1><br />
<arr1>500,525,550,575,600,17425,18000,</arr1><br />
<arr2>4.08,6.96,8.91,7.79,7.72,2.34,4.56</arr2><br />
</test1><br />
</duttest>
My xml document is given above. I write my arrays comma delimited to xml file but when the array size is large,say 1000000, it becomes cumbersome to write and read back. Because I have to use text processing. So, to overcome such text processing;
Is there a way to store to and than read these arrays back from an XML file.
Regards
Cengiz EKEN
|
|
|
|
|
Hi,
Regarding the help posted 2 days ago, The solution offered in that transaction was not the way that i need, because I used that method before.
As for your questions;
<duttest>
<test1>
<arr1>500,525,550,575,17875,17900,17925,17950,17975,18000,</arr1>
<arr2>25.998,28.776,22.487,21.561,21.537,</arr2>
</test1>
</duttest>
My xml document is given above. I write my arrays comma delimited to xml file but when the array size is large,say 1000000, it becomes cumbersome to write and read back. Because I have to use text processing. So, to overcome such text processing;
Is there a way to store to and than read these arrays back from an XML file.
Regards
Cengiz EKEN
|
|
|
|
|
When I use the VS2005 xsd gui (which I love) to build a schema what's the simplest way to generate a valid, unpopulated xml file? Do I have to write some C# code or is there a menu-driven tool that I'm missing.
Thanks.
|
|
|
|
|
Hello All,
I am transfroming xml file into word documnet from the xslt that i have generated . I am creating tables on the word document with some data, the problem is i have to create tables adajacent to each other, but xsl is creating table one below the other .. Any hint what setting i would have missed ??
Thanks and Regards
Ron
|
|
|
|
|
Ron.S wrote: I am transfroming xml file into word documnet from the xslt that i have generated
So your xslt is generating wordml? If yes then....
Ron.S wrote: but xsl is creating table one below the other .. Any hint what setting i would have missed ??
means you are not correctly generating wordml to it's specification. You need to find out the correct wordml you need and then change your xslt to generate it, yes?
|
|
|
|
|
i made the p2p application by using web service and vb.net code.
but i am not get a idea of making the cient of any p2p network.,pleae help me...........
|
|
|
|
|
I am working on a project that involves a great number of SQL queries in XSL documents. one in particular returns * in the query. Here is my dilema. I know for a fact one of the columns is an image pathway, and i need to access it, however, i do not know that the column name is, AND i do not have access to the DB.
What I need, if possible, is somethis that might allow me to expose the column names returned by the "select *" statement. Is this possible? Or am I stuck waiting for emails that may or may not answer what i need from the guy who contracted me?
______________________
Mr Griffin, eleventy billion is not a number...
|
|
|
|
|
You can query the database metadata to get this information. However, if you don't have access to the database then I'm afraid you're stuck.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Sorry I have to repeat the question
I have a XSLT and I want to pass a parameter runtime with javascript. Here is my XSL
<xsl:param name="surname" select="surname"/>
<xsl:template match="customer">
<tr>
<td><xsl:value-of select="$surname"/></td>
<td><xsl:value-of select="title"/></td>
<td><xsl:value-of select="DOB"/></td>
</tr>
</xsl:template>
I need to populate the surname, I am using the DOM object in javascript
Thanks in advance
Tony
|
|
|
|
|
var xslt = new ActiveXObject("Msxml2.XSLTemplate");<br />
var xslDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument");<br />
var xslProc;<br />
xslDoc.async = false;<br />
xslDoc.resolveExternals = false;<br />
xslDoc.load("YourXsl.xsl");<br />
xslt.stylesheet = xslDoc;<br />
var xmlDoc = new ActiveXObject("Msxml2.DOMDocument");<br />
xmlDoc.async = false;<br />
xmlDoc.resolveExternals = false;<br />
xmlDoc.load(YourXmlString);<br />
xslProc = xslt.createProcessor();<br />
xslProc.input = xmlDoc;<br />
xslProc.addParameter("surname",valueofSurname)
xslProc.output will give u desired table.. u just need to put it as innerHTML for ur page/form...
|
|
|
|
|
Thanks for that,
However it returns me a single value of the valueofSurname.
For example if the surname is "Stevens" will populate every surname with "Stevens" in the column.
What I need to do is to be able to change the value-of column and select firstname instead of surname.
regards
Tony
|
|
|
|
|
Then u can incorporate the same in ur xslt itself, u just need to use xpath,select desired node and directly put the value. If u can give me same xml and xsl may be i can give u an example of the same.
|
|
|
|
|
I have a XSLT and I want to pass a parameter runtime with javascript. Here is my XSL
<xsl:param name="surname">;
...
...
...
<xsl:template match="customer">
<xsl:value-of select="$surname/><br mode=" hold=" /><xsl:value-of select=" title="">
<xsl:value-of select="DOB">
I need to populate the surname, I am using the DOM object in javascript
Thanks in advance
Tony
|
|
|
|
|
i got an XmlDocument which contains the following nodes:
<br />
<br />
<msg t='xt'><body action='xtRes' r='-1'><![CDATA[<dataObj><var n='email' t='s'>9292</var><var n='name' t='s'>uds kan</var><var n='usersOnline' t='n'>1761</var><var n='bonus' t='s'>0</var><var n='points' t='n'>37</var><var n='_cmd' t='s'>logOK</var></dataObj>]]></body></msg><br />
<br />
<br />
my question is how do i Parse the CDATA section in the xml to a data object?
( i am using c sharp )
modified on Friday, December 07, 2007 9:16:34 AM
|
|
|
|
|
In www.eurostall.com I have created RSS feed like this only. Just you go to the file www.eurostall.com/sitemap.xml and analyse. It may help.
|
|
|
|
|
hi all,
I want to compare 2 xml files with each other. One xml file is standard on my pc and has the name standard.xml. the other xml file is on the server and has the name server.xml
i want to compare these 2 files with each other and if it contains new info it should be added in the pc.xml file.
in msdn, i found that XML diff and patch tool is used to compare two xml files. but i do not want to add a additional tool to be installed for this purpose.
i tried to do the comparison by getting the nodes in a XmlNodeList and comparing the two nodelists. but i am struck at one point.
how can i find out whether a node already exists in a xml document. say for eg,
in my xml file,i have a structure like this,
<Main>
<url type_node="S" tool_tip="http://www.mysite.com/sample.xml">http://www.mysite.com/sample.xml</url>
<Category2>
<url type_node="S" tool_tip="http://www.mysite.com/sample1.xml">http://www.mysite.com/sample1.xml</url>
</Category2>
</Main>
in this,
Category2 is a childnode of Main. i want to check if the url element for sample exists already in the document.
how can i do this. i tried using xmldoc.getElementsByTagName(node.innerText);
but i am always getting a count of 1 even if the node does not exits in the document.
Hope i am clear in my question.
Any suggestions?
Thanks in advance.
Regards
Anuradha
|
|
|
|
|
Can you explain it more.may be i can help.
|
|
|
|
|
Im Serializing this Object 'PersonNode'. It Serializing ok but the attribute 'name' is not coming through. Why would this be?
[Serializable]
public class PersonNode: List<child>
{
[XmlAttribute("name")]
public string name;
|
|
|
|
|
Without reading ur xml and .cs file Its not possible to answer your query...
|
|
|
|
|
I'v been advised to, and have chosen to follow that advice to, author a schema (xsd) that represents a hierarchy of classes (not an inheritance hierarchy, rather a master-child) and to generate the classes using the Visual Studio xsd.exe tool. This makes sense to me, as I currently have draft XML documents, for which I have hand [crafted] classes to represent functioning parts of the object described by the XML.
Currently I'm just taking my first step beyond the demo/prototype stage, where each class has hard-coded logic, even hard-coded element and attribute mappings, and moving toward a more generic serialization mechanism. This xsd.exe seems ideal, as my schema should be the driving artifact, not the classes. What I would like now is a crash course in schema authoring, an online resource I can print or download and take home with me. Who can recommend what for me?
|
|
|
|
|
I'm writing a C# Windows/.Net 2.0 app which will take a large XML document as an initial input. My form has 4 basic controls: 3 comboboxes (Country, State, and City) for filtering the XML data and a DataGrid to display the results. The XML doc has this format:
<updates xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<locations>
<country name="United States">
<state name="California">
<city name="Santa Monica">
<location id="2" venue_id="1" category="Hotel" name="Example Hotel" address="3214 Wilshire Blvd." zipcode="90404"/>
<location id="3" venue_id="2" category="Airport" name="Santa Monica Airport" address=" 3223 Donald Douglas Loop"/>
</city>
<city name="Los Angeles">
<location id="4" venue_id="3" category="wwan" name="Cell Carrier GPRS Network" address="Entire LA Metro Area"/>
</city>
<city name="San Diego">
<location id="5" venue_id="1" category="Hotel" name="Mike Hotel" address="3214 Mike Blvd." zipcode="90414"/>
<location id="6" venue_id="2" category="Airport" name="John Airport" address=" 3223 john Douglas Loop S Ste 3"/>
<location id="7" venue_id="1" category="Cafe" name="New Hotel" address="3214 New Scott Blvd." zipcode="90434"/>
<location id="8" venue_id="2" category="Bar" name="New Airport" address=" 3223 New Douglas Loop S Ste 4"/>
</city>
</state>
<state name="Colorado">
<city name="Colorado Springs">
<location id="2" venue_id="1" category="Hotel" name="Example Hotel" address="3214 El Paso Blvd." zipcode="90404"/>
<location id="3" venue_id="2" category="Airport" name="Colorado Springs Airport" address=" 3223 Airport Drive"/>
</city>
<city name="Denver">
<location id="4" venue_id="3" category="wwan" name="Cell Carrier GPRS Network" address="Entire COSP Metro Area"/>
</city>
</state>
</country>
</locations>
</updates>
I have no problem using XPath queries to extract the values to populate the Country, State, and City comboboxes; each selection drives the data in the subsequent combobox. Upon selection in the City combobox, I can query for a resulting set of 'locations'. My problem is how to stuff this XmlNodeList into a DataSet which I can then use with my DataGrid. I have no problem reading an entire document into a DataSet
DataSet ds = new DataSet();
ds.ReadXml("Test.Search.xml");
but have no idea how to stuff an XmlNodeList into one.
Thanks.
Jack80918
|
|
|
|
|
As you probably already know, an XmlNodeList is really a collection XmlNode s. You have mentioned you can read an XML document directly into a DataSet . So, I can give you a some suggestions.
1. You can create an XmlDocument populating it with XmlNode s cloned from the XmlNodeList .
2. You can create an XmlDocument using XSLT with the same criteria you used to create the XmlNodeList .
3. You can create a DataTable (or DataTable s) that corresponds to your XmlNodeList and extract data from your XmlNode s into the appropriate rows and columns.
There are certainly other ways of doing this. So, search the web for ideas or just be creative.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|