|
My Ques: How to set Table hint and Row hint in the
following example. Pl help me urgent
one. I want to create a crystal report using the
XML file. so i need the Table Hint and Row Hint
Values
<cube strategydesc="Gse" strategyname="dots"
="" dataentry="E" entityname="ALDI" entitydesc="ALDI">
<desc>
- <levelnode name="Exp" lvlid="1" edit="False">
<desc>customer.
- <levelnode name="Fea" lvlid="1.1" edit="False">
<desc>The Features
- <levelnode name="Mix" lvlid="1.1.1" edit="True">
<desc>how
- <levelnode name="High" lvlid="1.1.1.1" edit="False"
="" projection="1" key="Ad" relation="Coll">
<desc>The
|
|
|
|
|
My Ques: How to set a table hint and Row Rint in the below example
<cube strategydesc="digit" strategyname="sonic" dataentry="E" entityname="ALDI Entity"
="" entitydesc="ALDI Entity Descrpiton">
<desc>
- <levelnode name="Expectations" lvlid="1" edit="False">
<desc>customer.
- <levelnode name="Features" lvlid="1.1" edit="False">
<desc>services.
- <levelnode name="Mix" lvlid="1.1.1" edit="True">
<desc>customers.
- <levelnode name="High Quality" lvlid="1.1.1.1" edit="False" projection="1" key="Advantage" relation="Collaborative">
<desc>customers
|
|
|
|
|
Pl give an idea about Table hint and Row hint and give one example also
|
|
|
|
|
I want to transform dataset data to a text file. I am doing it using XSLT. It is getting transformed but rows are displayed one after the other not on a new line. How do I insert a New line character after each row in the text file. Is there any other way to export data from a dataset to a text file. The text file will be a fixed length test file.
Please help me as soon as possible
|
|
|
|
|
Why are you using XSLT ? Surely you can just iterate through the rows without turning the dataset to an XML document ? Then you can use Environment.Newline to stuff a line in between. You can also just put a return in your XSLT though, that should work.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
I have lacs of records and it will take lot of time to iterate through each record. What does "return" mean in the statement "You can also just put a return in your XSLT though, that should work." If I write "return" in XSLT it will simply write return in the text file.
|
|
|
|
|
Dinesh Thakan wrote:
I have lacs of records and it will take lot of time to iterate through each record.
That's all the XSLT is doing....
Dinesh Thakan wrote:
What does "return" mean in the statement "You can also just put a return in your XSLT though, that should work."
Christian means a 'carriage-return'. If you put the numeric entities into your XSLT, that should insert a new-line?
Stuart Dootson
'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'
|
|
|
|
|
Thanks Christian Graus and Stuart Dootson for your support. I was able to get the line feed in my text file. Now there is another problem, the XML gets written in my text file after the transformed data. The xsl being used is given below.
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:AES="urn:my-scripts" >
<xsl:output method="text"/>
<msxsl:script language="VB" implements-prefix="AES">
Function ReturnCharacter
return VbCrlf
End Function
</msxsl:script>
<xsl:template match="/">
<xsl:for-each select="NewDataSet/Table">
<xsl:value-of select="CustomerID"/>
<xsl:value-of select="CompanyName"/>
<xsl:value-of select="ContactName"/>
<xsl:value-of select="Country"/>
<xsl:value-of select="Phone"/>
<xsl:value-of select="AES:ReturnCharacter()"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
<big><b>The OutPut is: </b></big> In the output you can see the xml appended at the last. I do not want thi sXML in my text document. What should I do.
TRAIHTrail's Head Gourmet ProvisionersHelvetius NagyUSA(206) 555-8257
VAFFEVaffeljernetPalle IbsenDenmark86 21 32 43
VICTEVictuailles en stockMary SaveleyFrance78.32.54.86
VINETVins et alcools ChevalierPaul HenriotFrance26.47.15.10
WANDKDie Wandernde KuhRita MüllerGermany0711-020361
WARTHWartian HerkkuPirkko KoskitaloFinland981-443655
WELLIWellington ImportadoraPaula ParenteBrazil(14) 555-8122
WHITCWhite Clover MarketsKarl JablonskiUSA(206) 555-4112
WILMKWilman KalaMatti KarttunenFinland90-224 8858
WOLZAWolski ZajazdZbyszek PiestrzeniewiczPoland(26) 642-7012
<NewDataSet><Table><CustomerID>ALFKI</CustomerID><CompanyName>Alfreds Futterkiste</CompanyName><ContactName>Maria Anders</ContactName><Country>Germany</Country><Phone>030-0074321</Phone></Table><Table><CustomerID>ANATR</CustomerID><CompanyName>Ana Trujillo Emparedados y helados</CompanyName><ContactName>Ana Trujillo</ContactName><Country>Mexico</Country><Phone>(5) 555-4729</Phone></Table><Table><CustomerID>ANTON</CustomerID><CompanyName>Antonio Moreno Taquería</CompanyName><ContactName>Antonio Moreno</ContactName><Country>Mexico</Country><Phone>(5) 555-3932</Phone></Table><Table><CustomerID>AROUT</CustomerID><CompanyName>Around the Horn</CompanyName><ContactName>Thomas Hardy</ContactName><Country>UK</Country><Phone>(171) 555-7788</Phone></Table><Table><CustomerID>BERGS</CustomerID><CompanyName>Berglunds snabbköp</CompanyName><ContactName>Christina Berglund</ContactName><Country>Sweden</Country><Phone>0921-12 34
|
|
|
|
|
Sorry, it was my mistake in the Code, I was writing the dataset also in the output file. It is resolved now.
|
|
|
|
|
# Adding a carriage return (WITHOUT SPACES): <xsl:text>& # x 0 D ;</xsl:text>
# Adding a line feed (WITHOUT SPACES): <xsl:text>& # x 0 A ;</xsl:text>
<xsl:template match="/">
<xsl:for-each select="NewDataSet/Table">
<xsl:value-of select="CustomerID"/>
<xsl:value-of select="CompanyName"/>
<xsl:value-of select="ContactName"/>
<xsl:value-of select="Country"/>
<xsl:value-of select="Phone"/>
<xsl:text>& # x 0 A ;</xsl:text>
</xsl:for-each>
</xsl:template>
YOU DO NOT NEED
<msxsl:script language="VB" implements-prefix="AES">
Function ReturnCharacter
return VbCrlf
End Function
</msxsl:script>
|
|
|
|
|
how can i access an XML file in vc++ 6.0 using .ini file without using MSXML parser?
|
|
|
|
|
you are putting xml in your .ini file ? I guess you can use iostreams to read the file, but then you're parsing it as plain text. If you want to parse it as XML, C++ does not have that facility, that's what the MSXML parser is for.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Hi,
I 've a function which takes 2 parameters, a dataset , path to XSD file. Based on contents of the xsd file i need to modify data in daatset to generate appropriate xml.How do I do this?
Thanks in advance
Priya
|
|
|
|
|
I'm combining XML and XSLT server side and I send HTML back to the client. What I'd like to know is if I can use/create a code behind for this HTML page and if yes: how?
Thanks
|
|
|
|
|
This is an ASP.NET question. Put a static control on your page, and fill it with the result of your XSLT transform.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Thanks, but how can I catch user events send by the static control? In a regular page it's done simply by making a code behind page. However, if I combine XML en XSLT serverside, the result is a page without even a name, let alone a code behind page/link to it.
Thanks
|
|
|
|
|
You mean by controls you create dynamically within the XSLT ? Well, you can only create HTML, you can't create asp:xxx controls, they just get added to the page too late. My point though is that you create a proper page, with code behind, then add the contents of your XSLT to the static control for rendering. You can still add other controls and you will get their events. If you have, for example, a button being added to the page every time, rethink your layout, try to remove it from the XSLT. The easiest way to do this is to add C# extensions to your XSLT, and then use them to set the properties of buttons you've added yourself. It's possible to dynamically add controls to the pages collection and get their events, so long as then number/names of the controls don't change and you do it early enough.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
hi..i am stud of comp sci and currently doing some research and developing few steganography techniques that can be applied on xml doc....as far as i have searched there isn't much work done on it....if any one here has stumbled across any related work or 've any knowledge abt it..plz share with me..maybe i 've missed something..it 'll help me alot....plz feel free to let me know if u 've any suggestions regarding steganography & xml...thanks
|
|
|
|
|
|
thanks for not telling me anything ..it was helpful
|
|
|
|
|
Hi,
I have an XML file and the corresponding schema file generated by XMLSpy Home Edition. How can I create C++ classes from this schema? I am looking for a free tool, if there is such a thing.
Thanks,
Royce
|
|
|
|
|
At the start-up of my application, I need to read XML data that is likely to be spread out over several individual XML files. Data from the first file will be read and updated, then the first file can be closed for the duration of the process. Then the next file will be read and updated, then the file can be closed for the duration of the process. This will occur for all the XML files (there could be 20 or 30 XML files that will likely average about 120k-150k). This will all be done as the application initializes.
This leads to my question. Which parsing model is better suited for my needs: XMLDOM or XML Reader? I recognize that there could be differing opinions on the subject but I would greatly value and appreciate some expert advice.
Speed is probably my biggest issue as I want the application initialization to finish as quickly as possible.
My understanding is that XMLDOM provides quicker read/write access but could take a while to be loaded into memory whereas the XML Reader method provides slower read/write access but doesn’t require the memory overhead or loading time of XMLDOM.
The way I currently have it implemented is with the XML Reader model. I read the XML file, update the data, and write the entire XML file back out. There doesn’t seem to be a better way as this model does not appear to allow random access or in-place data insertion. Am I wrong about this?
Thanks in advance,
-Ian
|
|
|
|
|
hi there,
I am not XML expert, but
Ian Bowler wrote:
My understanding is that XMLDOM provides quicker read/write access but could take a while to be loaded into memory whereas the XML Reader method provides slower read/write access but doesn’t require the memory overhead or loading time of XMLDOM.
The fact that XMLDOM is "faster" is true AFTER it's readed to memory and parsed - and reading and parsing takes time... I don't see reason why using XmlReader should be slower. It depends on what you with XML. See below.
Ian Bowler wrote:
The way I currently have it implemented is with the XML Reader model. I read the XML file, update the data, and write the entire XML file back out. There doesn’t seem to be a better way as this model does not appear to allow random access or in-place data insertion. Am I wrong about this?
It doesn't allow random access because XmlReader reads XML file sequentionaly - token after token - you never have whole document in memory. If you only update some values,
For .NET world, XmlReader is definitely fastest way how to read XML document.
Some useful links:
Skipping Content with XmlReader[^]
Comparing XmlReader to SAX Reader[^]
Patterns & practices: Chapter 9 — Improving XML Performance[^]
and, finally:
Efficient Techniques for Modifying Large XML Files[^]
(my personal favourite)
Rule of thumb: if you don't need to change structure of XML document ("tree operations"), don't use XmlDocument (if you care about speed and memory). Use XmlReader/XmlWriter instead. If you want to search/select using XPath expression in XML, use XPathDocument.
You should be able to answer core of your question yourself, but I'll do that anyway: if your modifications can be easily done with XmlReader/XmlWriter combination, then it's most probably fastest solution. (in sense of best performing, not ease of programming however)
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
Thanks for your reply. I'm sure those links will be very helpful as I continue to learn XML.
Regards,
Ian
|
|
|
|
|
XMLDOM can be allowed to save edited XML Documents and provides the facility to transform the XML data using XSLT.
raman
|
|
|
|