Advertisement

06.05.2008 at 04:53PM PDT, ID: 23462314
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.7

perl script to transform xml into csv or pipe delimited

Asked by catalini in Perl Programming Language

Tags:

Hi! I have some large xml files that I need to import in ms access. Using excel I'm getting some problems with special characters (&, ...).

Is there any clean way to transform an xml into csv or even better a pipe delimited file?

Attached you'll see an xsl file that handles the xml files I'm using.

thanks!Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
<xsl:template match="/">
<html>
<body style="font-family:Arial,helvetica,sans-serif;">
<xsl:apply-templates/> 
<hr />
trailer
</body>
</html>
</xsl:template>
 
<xsl:template match="file/entry">
<p><xsl:value-of select="@no"/>:<br />
<xsl:apply-templates/>
</p>
</xsl:template>
 
<xsl:template match="variant">
<xsl:value-of select="@no"/> (<xsl:value-of select="@confidence"/>):
<xsl:apply-templates/><br />
</xsl:template>
 
<xsl:template match="author">
<span style="color:red"><xsl:apply-templates/></span>
</xsl:template>
<xsl:template match="booktitle">
<span style="color:orange"><xsl:apply-templates/></span>
</xsl:template>
<xsl:template match="date">
<span style="color:gold"><xsl:apply-templates/></span>
</xsl:template>
<xsl:template match="editor">
<span style="color:navy"><xsl:apply-templates/></span>
</xsl:template>
<xsl:template match="institution">
<span style="color:purple"><xsl:apply-templates/></span>
</xsl:template>
<xsl:template match="journal">
<span style="color:green; font-style:italic"><xsl:apply-templates/></span>
</xsl:template>
<xsl:template match="location">
<span style="color:blue"><xsl:apply-templates/></span>
</xsl:template>
<xsl:template match="note">
<span style="color:tan"><xsl:apply-templates/></span>
</xsl:template>
<xsl:template match="pages">
<span style="color:darkgray"><xsl:apply-templates/></span>
</xsl:template>
<xsl:template match="publisher">
<span style="color:green"><xsl:apply-templates/></span>
</xsl:template>
<xsl:template match="tech">
<span style="color:aqua"><xsl:apply-templates/></span>
</xsl:template>
<xsl:template match="title">
<span style="color:blue; font-weight:bold"><xsl:apply-templates/></span>
</xsl:template>
<xsl:template match="volume">
<span style="color:salmon"><xsl:apply-templates/></span>
</xsl:template>
 
 
<xsl:template match="error">
<xsl:choose>
  <xsl:when test="@correct='author'">
    <span title="author" style="background:pink"><xsl:apply-templates/></span>
  </xsl:when>
  <xsl:when test="@correct='booktitle'">
    <span title="booktitle" style="background:pink"><xsl:apply-templates/></span>
  </xsl:when>
  <xsl:when test="@correct='date'">
    <span title="date" style="background:pink"><xsl:apply-templates/></span>
  </xsl:when>
  <xsl:when test="@correct='editor'">
    <span title="editor" style="background:pink"><xsl:apply-templates/></span>
  </xsl:when>
  <xsl:when test="@correct='institution'">
    <span title="institution" style="background:pink"><xsl:apply-templates/></span>
  </xsl:when>
  <xsl:when test="@correct='journal'">
    <span title="journal" style="background:pink"><xsl:apply-templates/></span>
  </xsl:when>
  <xsl:when test="@correct='location'">
    <span title="location" style="background:pink"><xsl:apply-templates/></span>
  </xsl:when>
  <xsl:when test="@correct='note'">
    <span title="note" style="background:pink"><xsl:apply-templates/></span>
  </xsl:when>
  <xsl:when test="@correct='pages'">
    <span title="pages" style="background:pink"><xsl:apply-templates/></span>
  </xsl:when>
  <xsl:when test="@correct='publisher'">
    <span title="publisher" style="background:pink"><xsl:apply-templates/></span>
  </xsl:when>
  <xsl:when test="@correct='tech'">
    <span title="tech" style="background:pink"><xsl:apply-templates/></span>
  </xsl:when>
  <xsl:when test="@correct='title'">
    <span title="title" style="background:pink"><xsl:apply-templates/></span>
  </xsl:when>
  <xsl:when test="@correct='volume'">
    <span title="volume" style="background:pink"><xsl:apply-templates/></span>
  </xsl:when>
  <xsl:otherwise>
    <span title="ha" style="background:pink"><xsl:apply-templates/></span>
  </xsl:otherwise>
</xsl:choose>
</xsl:template>
 
</xsl:stylesheet>
[+][-]06.06.2008 at 02:23AM PDT, ID: 21727409

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.06.2008 at 05:35AM PDT, ID: 21728369

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.06.2008 at 08:30AM PDT, ID: 21729986

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.06.2008 at 08:50AM PDT, ID: 21730175

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.06.2008 at 09:39AM PDT, ID: 21730604

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.06.2008 at 09:42AM PDT, ID: 21730637

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Perl Programming Language
Tags: perl, xml
Sign Up Now!
Solution Provided By: Adam314
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.06.2008 at 09:59AM PDT, ID: 21730796

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.06.2008 at 10:01AM PDT, ID: 21730812

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.06.2008 at 10:08AM PDT, ID: 21730874

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06.06.2008 at 10:34AM PDT, ID: 21731112

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.06.2008 at 11:01AM PDT, ID: 21731351

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.06.2008 at 11:53AM PDT, ID: 21731788

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.06.2008 at 01:51PM PDT, ID: 21732592

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.06.2008 at 01:58PM PDT, ID: 21732641

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.06.2008 at 01:59PM PDT, ID: 21732648

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.06.2008 at 02:05PM PDT, ID: 21732691

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628