|
I have created a program using vb.net which use xml database. I need to display the text as formatted like bold letter, italics, etc. Can it be done.
this character gives a newline, but I need to display my characters/words as bold, italics, etc. Is there anything I can do to display them as I desired.
Any suggestion would be highly appreciated.
Thank you.
|
|
|
|
|
you could add the font and display properties of a string as a attribute in the xml tag, then parse it and set the font properties of the control that displays the text according to the data in the xml-attributes, this is based on a wild guess on how you display the text, since you don't mention how you load and display the xml file, do you load it in a datatable and uses a datagridview to display it, do you parse it manualy with the System.xml namespace and display the text in a listview or what?
|
|
|
|
|
My xml code is as below :
<?xml version="1.0" encoding="utf-16"?>
<List>
<File Thumal="jukebox" Awmzia="jukebox
Thingrem zai thei" />
</List>
The newline character I can make using
but I want to display some of my word as italic, bold, etc. for example if I want to display jukebox as bold, or italic how do i do that. Would be very grateful if anyone lend me a hand here.
Thank you.
|
|
|
|
|
Hi
I have created a C# XML Reader and was wondering if someone could have a look at the code to see if I have done it right.
Thanks
Andrew
-------------------------------
using System;
using System.Xml;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace MyProject
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
System.IO.StreamReader stream = new System.IO.StreamReader ("About.xml");
XmlTextReader reader = null;
reader = new XmlTextReader (stream);
while (reader.Read())
{
switch (reader.NodeType)
{
case XmlNodeType.Element: // The node is an Element.
Console.Write("<" + reader.Name);
while (reader.MoveToNextAttribute()) // Read attributes.
Console.Write(" " + reader.Name + "='" + reader.Value + "'");
Console.Write(">");
Console.WriteLine(">");
break;
case XmlNodeType.Text: //Display the text in each element.
Console.WriteLine (reader.Value);
break;
case XmlNodeType. EndElement: //Display end of element.
Console.Write("</" + reader.Name);
Console.WriteLine(">");
break;
}
}
}
}
}
Andrew McIntyre
|
|
|
|
|
Hi Andrew. This isn't the best way to ask a question on CodeProject. What you'll want to do instead is try out your code and if it isn't working the way you expect or want, ask a specific question that targets what is going wrong (for example, it's better for volunteers to read through four lines of code that target where you think the problem is, rather than go through a full dump of code... and if you make it easier for volunteers to help you, they will!)
[EDIT] - oh, and it's never a good idea to use "Help" for the subject line. Everyone already knows you're looking for help, otherwise you wouldn't be posting here. A subject line that helps focus on the specific question you have in mind is much better and easier for volunteers to work with.
|
|
|
|
|
Everytime I debug the project and when the client appear the XML document that I want to appear doesn't appear on screen for some reason. I get no error in the error list and thats why I have asked you guy's.
Andrew
Andrew McIntyre
|
|
|
|
|
|
Try using the debugger. Put a breakpoint on the first "Console.WriteLine" statement, then examine program variables and single step through the code to try and discover where you are going wrong.
|
|
|
|
|
Well I downloaded your code and it works fine. EXCEPT, this is a WinForms application and you are displaying the information via Console.WriteLine so all the output is going to the console output window rather than being displayed in your windows form.
I would suggest that you spend some more time learning how to use WinForms applications before proceeding further.
|
|
|
|
|
Hi Friends,
I have created one Web Service which give output in following format.
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlnsoap="http://schemas.xmlsoap.org/soap/envelope/" xmlnssi="http://www.w3.org/2001/XMLSchema-instance" xmlnssd="http://www.w3.org/2001/XMLSchema">
<soapody>
<ShowResponse xmlns="http://abc.com/WS/service.asmx">
<ShowResult>
<xschema id="NewDataSet" xmlns="" xmlnss="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urnchemas-microsoft-comml-msdata">
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded"><xs:element name="ShowResponse">
<xs:complexType>
<xsequence>
<xs:element name="ShowReturn" msdata:Caption="ShowDetail" type="xstring" minOccurs "0" maxOccurs="unbounded">
<xs:element name="ShowResponse">
<xs:complexType>
<xsequence>
<xs:element name="ShowReturn" msdata:Caption="ShowDetail" type="xstring" minOccurs="0" />
</xsequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xschema>
<diffgriffgram xmlns:msdata="urnchemas-microsoft-comml-msdata" xmlnsiffgr="urnchemas-microsoft-comml-diffgram-v1">
<NewDataSet xmlns="">
<ShowResponse diffgr:id="ShowResponse1" msdata:rowOrder="0" diffgr:hasChanges="inserted">
<ShowReturn>11iou3zzj1vfsy55lsietz45|3</ShowReturn>
</ShowResponse>
</NewDataSet>
</diffgriffgram>
</ShowResult>
</ShowResponse>
</soap>
want to show the same output in following format
<?xml version='1.0' encoding='UTF-8'?>
<S:Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Sody>
<ns2showResponse xmlns:ns2="http://ws"> <ShowReturn>1248759429159ARY2265657989;/ShowReturn>
</ns2showResponse>
</Sody>
Please help me regarding the same and tell me how to format soap message request response using Visual Studio 2005 IDE...
Thanks and regards
Sasmi
|
|
|
|
|
I have a large xml document and I am extracting out individual nodes from it. I don't want any manipulation.
its like
start-large
start-small
.
.
close-small
start-small
.
.
close-small
and so on.
It works fine if I do.
XmlDocument xmlDoc= new XmlDocument();
xmlDoc.Load(xr.ReadSubtree());
xmlDoc.Save("c:\\one.xml");
But for the following the XMl document I get it messed up.
XmlTextWriter xw = new XmlTextWriter("C:\\two.xml", null);
xw.WriteNode(xr.ReadSubtree(), true);
I get errors like "end element missing" or "not properly closed".
What am I doing wrong in case of text writer? xr is the xmltextReader which is reading the large file.
Your help is appreciated.
|
|
|
|
|
Dear Friend,
Thanks for being her for help us....
I am in big trouble now, as i have to create a webservice for one of my client for some travel related web site, the requirement is to receive soap request from one of the client and send response...., i don't know how to work on SOAP just have knowledge of WebService but don't know how to use SOAP in that....
the requirement specification is as follows
WebServices Interfacing with Customer should support the following HTTP
Headers
Accept: text/html
Accept: multipart/*
Content-Length: <some arbitrary size>
Content-Type: text/xml; charset=utf-8
SAMPLE REQUEST
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAPENV="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns2:ShowHotelDetail xmlns:ns2="http://ws">
<username xsi:type="xsd:string">xyz</username>
<password xsi:type="xsd:string">abc@123</password>
<hotelrefno xsi:type="xsd:string">APQR1234</refno>
<sessionId xsi:type="xsd:string">12379975773148QM750WP9R</sessionId>
</ns2:ShowRemittanceDetail>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
SAMPLE RESPONSE
<?xml version='1.0' encoding='UTF-8'?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:ShowHotelDetailResponse xmlns:ns2="http://ws">
<ShowHotelDetailReturn>12379975773148QM750WP9R|HOTEL XYZ|0|10000.78|pascalachenita|
carmen|||||street santander, number 12, no 78-90 street,Mumbai|+12121212121</ShowHotelDetailReturn>
</ns2:ShowHotelDetailResponse>
</S:Body>
</S:Envelope>
Please Help me the process is we have the list of Inforamtion about the hotels they send us request for selected hotel we will send them response with "|" delimeter text string as ShowHotelDetailReturn in dataset..
Me created this web service usting .Net Technology and C# language..
but at custoemr end its giving error as followed.
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault><faultcode>soap:Client</faultcode><faultstring>Unable to handle request without a valid action parameter. Please supply a valid soap action.</faultstring><detail /></soap:Fault>
</soap:Body></soap:Envelope>
when i ask them for the error they told me that "Your application is expecting a SOAPAction parameter in the header part".
please help me for the same as it's really difficult for me to work on this without any idea....
please send me some code, link or article regarding the same
Thanks and regards,
Sasmi
|
|
|
|
|
Hi every one!!
my question is i have tree structure data, so now i want to createxml file according to tree structure
and its xml file should like a middle storage file and USING THIS XML FILE all database servers like sql server2005,oracle,pervesive server and so. should use
tell me how should i do this bro's and sis's
this is my tree structure.
+user
......-user1
......-user2
.
.
......-usern
+Policies
.......+Adminstrator
............ -adminUser1
............ -Adminuser2
............ -adminuser..n
.......+supports
............ -supportuser1
............ -supportuser2
............ -supportuser..n
+companies
.......+Company1
...........+adminstrator
..................-adminuser1
..................-adminuser2
..................-adminuser..n
.......+company2
+adminstrator
..................-adminuser1
..................-adminuser2
..................-adminuser..n
.......+company3
...........+adminstrator
..................-adminuser1
..................-adminuser2
..................-adminuser..n
...........+support
..................-supportuser1
..................-supportuser2
..................-supportuser.n
+menus
.......+Transaction
...........+payroll
..................-Add Employee
...........+batches
..................-New batch
.......+Enquiry
...........+batches
..................-New batch
...........+Invoice
..................-new invoice
.......+LOgout
This is my tree structure PLzz can u tell me how ll do in Xml format
Some Thing need 2 do NEW
modified on Monday, July 27, 2009 10:50 AM
|
|
|
|
|
Good Day all
I have an SP that is defined like this
ALTER PROCEDURE [dbo].[sp_Constraints_Update] @xml ntext,
@TTBLType varchar(5)
AS
set nocount on
DECLARE @xmldoc int
DECLARE @sql varchar(8000)
-- In one long sql string do all of the following
--Create an internal representation of the XML document.
EXEC sp_xml_preparedocument @xmldoc OUTPUT, @xml
if exists (select * from [tempdb].[dbo].sysobjects where id = object_id(N'[tempdb].[dbo].[#Constraints]'))
drop table [#Constraints]
-- turn the xml into a table with characteristics of the given table
SELECT *
INTO #Constraints
FROM OPENXML ( @xmldoc , '/Root/Row' , 2)
WITH (
[ID] int, -- ID of the activitiy or contact (XM) to update
DayOp char(7) 'Day_Action',
[Day] int 'Day',
SessOp char(7) 'Period_Action',
Sess int 'Period'
)
EXEC sp_xml_removedocument @xmldoc
--select * from #Constraints
update #Constraints set [Day] = null where [Day] = 0 -- can't have [Day] <, = or > 0
update #Constraints set [Sess] = null where [Sess] = 0 -- can't have [Day] <, = or > 0
-- todo make this generic for class or exam
update tbl_actv
set [Day] = #Constraints.[Day],
DayOp = case(#Constraints.[DayOp])
when 'on' then '='
when 'before' then '<'
when 'after' then '>'
end,
Session = #Constraints.Sess,
SessOp = case(#Constraints.[SessOp])
when 'on' then '='
when 'before' then '<'
when 'after' then '>'
end
from #Constraints
where #Constraints.ID = tbl_actv.ID
and i have have tried to execute it like this
exec sp_Constraints_Update 'EXAM','<Root><Row><ID>3</ID><Activity>ACC121 T1 [1]</Activity><Day_Action>on</Day_Action><Day>15</Day><Period_Action>on</Period_Action><Period>15</Period></Row><Row><ID>9</ID><Activity>ADM121 T1 [1]</Activity><Day_Action>on</Day_Action><Day>4</Day><Period_Action>on</Period_Action><Period>4</Period></Row><Row><ID>13</ID><Activity>ADM122 T1 [1]</Activity><Day_Action>on</Day_Action><Day>1</Day><Period_Action>on</Period_Action><Period>7</Period></Row><Row><ID>50</ID><Activity>BEC122 T1 [1]</Activity><Day_Action>on</Day_Action><Day>12</Day><Period_Action>on</Period_Action><Period>143</Period></Row><Row><ID>44</ID><Activity>BEC121 T1 [1]</Activity><Day_Action>on</Day_Action><Day>12</Day><Period_Action>on</Period_Action><Period>12</Period></Row><Row><ID>126</ID><Activity>MRK122 T1 [1]</Activity><Day_Action>on</Day_Action><Day>1</Day><Period_Action>on</Period_Action><Period>4</Period></Row><Row><ID>287</ID><Activity>ENGL321 T1 [1]</Activity><Day_Action>on</Day_Action><Day>1</Day><Period_Action>on</Period_Action><Period>21</Period></Row><Row><ID>288</ID><Activity>ENTR_E_221 T1 [1]</Activity><Day_Action>on</Day_Action><Day></Day><Period_Action>on</Period_Action><Period></Period></Row><Row><ID>289</ID><Activity>FRAN111 T1 [1]</Activity><Day_Action>on</Day_Action><Day></Day><Period_Action>on</Period_Action><Period></Period></Row><Row><ID>290</ID><Activity>GRMN111 T1 [1]</Activity><Day_Action>on</Day_Action><Day></Day><Period_Action>on</Period_Action><Period></Period></Row><Row><ID>291</ID><Activity>LATN111 T1 [1]</Activity><Day_Action>on</Day_Action><Day></Day><Period_Action>on</Period_Action><Period></Period></Row><Row><ID>292</ID><Activity>LATN211 T1 [1]</Activity><Day_Action>on</Day_Action><Day></Day><Period_Action>on</Period_Action><Period></Period></Row><Row><ID>293</ID><Activity>LATN311 T1 [1]</Activity><Day_Action>on</Day_Action><Day></Day><Period_Action>on</Period_Action><Period></Period></Row><Row><ID>294</ID><Activity>LATN321 T1 [1]</Activity><Day_Action>on</Day_Action><Day></Day><Period_Action>on</Period_Action><Period></Period></Row><Row><ID>295</ID><Activity>LEER_E_111 T1 [1]</Activity><Day_Action>on</Day_Action><Day></Day><Period_Action>on</Period_Action><Period></Period></Row><Row><ID>296</ID><Activity>LEER_R_111 T1 [1]</Activity><Day_Action>on</Day_Action><Day></Day><Period_Action>on</Period_Action><Period></Period></Row><Row><ID>297</ID><Activity>LLBR111 T1 [1]</Activity><Day_Action>on</Day_Action><Day></Day><Period_Action>on</Period_Action><Period></Period></Row><Row><ID>298</ID><Activity>LLBR113 T1 [1]</Activity><Day_Action>on</Day_Action><Day></Day><Period_Action>on</Period_Action><Period></Period></Row><Row><ID>299</ID><Activity>LLBR114 T1 [1]</Activity><Day_Action>on</Day_Action><Day></Day><Period_Action>on</Period_Action><Period></Period></Row><Row><ID>300</ID><Activity>LLBR211 T1 [1]</Activity><Day_Action>on</Day_Action><Day></Day><Period_Action>on</Period_Action><Period></Period></Row></Root>'
and i got the Following Error
The XML parse error 0xc00ce556 occurred on line number 1, near the XML text "EXAM".
Msg 6602, Level 16, State 2, Procedure sp_xml_preparedocument, Line 1
The error description is 'Invalid at the top level of the document.'.
Msg 8179, Level 16, State 5, Procedure sp_Constraints_Update, Line 24
Could not find prepared statement with handle 0.
The statement has been terminated.
Msg 6607, Level 16, State 3, Procedure sp_xml_removedocument, Line 1
sp_xml_removedocument: The value supplied for parameter number 1 is invalid.
Msg 208, Level 16, State 0, Procedure sp_Constraints_Update, Line 40
Invalid object name '#Constraints'.
I thought the Problem was on C# side , while troubleshooting i came to the SP and found that the execution of the sp is a problem.
Thank you
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
I might be missing something but you appear to have your parameters the wrong way around, 'EXAM' should be after the XML string not before.
|
|
|
|
|
Am Sorry its one of the days.
Thanks its working
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
I want to write a web application (application A) containing XML file .
This web application will be invoked from an HTTP request (from another application - application B) .
Application A should then send the XML file to Application B and return back to Application A with returned data .
My first task is how do I create the XML - But I'm not sure how I go about doing it ???
using ASP.net???
|
|
|
|
|
I am not clear. You are asking about creating XML but you didn't told what sort of data actually XML file will contain. I mean this is this file will be some serialized form of an object used for message passing or it could contain any data that you want to upload. Any how if you do have the XML file and want to post it webapplication you will need to make use of HttpWebRequest and HttpWebResponse. First create some generic handler in you web app and then create and post XML file contents via HttpWebRequest. Process contents in handler and return some suitable desired response. For example codes try googling or use code project search for "Posting Data via HttpWebRequest" keyword.
|
|
|
|
|
A little more context would help.
Are you familiar with XML? Have you worked with XML before?
|
|
|
|
|
Hi All,
I have an simple xml file for which I generated an xsd file using Altova XMLSpy tool.
As I wanted the end user who makes the xml entry to enter an unique ID which is an attribute of one of the elements. I modified the generated xsd file to accomodate this rule by including "xs:unique" node and entered valid values(i believe)but to no avail.
Below is my xml file.
<?xml version="1.0"?>
<wwdfdb:DDB xmlns:wwdfdb="http://www.xybec.com/ns/wwdfdb" version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.xybec.com/ns/wwdfdb Sample.xsd">
<wwdfdb:MyList>
<wwdfdb:Num id="3020">
<wwdfdb:Ver>1.0.0.1</wwdfdb:Ver>
<wwdfdb:Status>InUse</wwdfdb:Status>
</wwdfdb:Num>
<wwdfdb:Num id="3021">
<wwdfdb:Ver>1.0.0.1</wwdfdb:Ver>
<wwdfdb:Status>InUse</wwdfdb:Status>
</wwdfdb:Num>
</wwdfdb:MyList>
</wwdfdb:DDB>
Below is the xsd file for the xml file.
<?xml version="1.0" encoding="UTF-8"?>
<!--W3C Schema generated by XMLSpy v2009 sp1 (http:
<xs:schema xmlns="http://www.xybec.com/ns/wwdfdb" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.xybec.com/ns/wwdfdb">
<xs:element name="Ver">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="1.0.0.1"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Status">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="InUse"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Num">
<xs:complexType>
<xs:sequence>
<xs:element ref="Ver"/>
<xs:element ref="Status"/>
</xs:sequence>
<xs:attribute name="id" use="required">
<xs:simpleType>
<xs:restriction base="xs:short">
<!--<xs:enumeration value="3020"/>
<xs:enumeration value="3021"/>-->
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="MyList">
<xs:complexType>
<xs:sequence>
<xs:element ref="Num" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<!--added below lines to achieve uniqueness for attribute 'id' but to no avail-->
<xs:unique name="MyUniqueID">
<xs:selector xpath="Num"/>
<xs:field xpath="@id"/>
</xs:unique>
</xs:element>
<xs:element name="DDB">
<xs:complexType>
<xs:sequence>
<xs:element ref="MyList"/>
</xs:sequence>
<xs:attribute name="version" use="required">
<xs:simpleType>
<xs:restriction base="xs:decimal">
<xs:enumeration value="1.0"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>
Plese note that I have included the 'xs:unique' element in the xsd file above to enforce the rule above but to no avail.
Could somebody correct me and guide such that I can enforce an rule in xsd such that any new block added in the xml file should have an unqiue id.
|
|
|
|
|
In xmllint (libxml2's standalone app), I needed to add an explicit namespace specification for the elements in the unique spec:
<xs:unique name="MyUniqueID" xmlns:wwdfdb="http://www.xybec.com/ns/wwdfdb" >
<xs:selector xpath="wwdfdb:Num"/>
<xs:field xpath="@id"/>
</xs:unique>
That did the right thing (validating uniqueness, rejecting sameness) in the limited testing I did!
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
It works.
Thanks a lot Stuart for the solution.
|
|
|
|
|
Hello, i have a semi-weird xml file to parse with xsl. The xml has an extra tag which defines what the data is below , how do i go about disregarding anything with ColName in my xsl ?
XML
<br />
<?xml version="1.0" encoding="ISO-8859-1"?><br />
<br />
<Report><br />
<br />
<ColName> DateTime </ColName><br />
<ColName> PointName </ColName><br />
<ColName> PointValue </ColName><br />
<br />
<Record><br />
<Date> data </Date><br />
<Name> data </Name><br />
<Value> data </Value><br />
</Record><br />
<br />
<Report><br />
<br />
<ColName> DateTime </ColName><br />
<ColName> PointName </ColName><br />
<ColName> PointValue </ColName><br />
<br />
<Record><br />
<Date> data </Date><br />
<Name> data </Name><br />
<Value> data </Value><br />
</Record><br />
<br />
<Record><br />
<Date> data </Date><br />
<Name> data </Name><br />
<Value> data </Value><br />
</Record><br />
<br />
<br />
<br />
</Report><br />
<br />
<code><br />
<br />
<br />
XSL<br />
<br />
<code><?xml version="1.0"?><br />
<xsl:stylesheet version = "1.0"<br />
xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"><br />
<xsl:output method="text"/><br />
<xsl:strip-space elements = "Report"/><br />
<xsl:template match="Record"><br />
<text>
</text><br />
<xsl:text/><xsl:value-of select="normalize-space(Record)"/><xsl:text/><br />
<xsl:value-of select="normalize-space(DateTime)"/>,<xsl:text/><br />
<xsl:value-of select="normalize-space(PointName)"/>,<xsl:text/><br />
<xsl:value-of select="normalize-space(PointValue)"/>,<xsl:text/><br />
<text>
</text><br />
<xsl:text disable-output-escaping = "yes" ><br />
</xsl:text><br />
</xsl:template><br />
</xsl:stylesheet>
Thanks
Matt
|
|
|
|
|
matty2desmara wrote: how do i go about disregarding anything with ColName in my xsl ?
I suspect you're running foul of the default behaviour of XSL, which passes through all tags unchanged unless you say otherwise. Add a root element template that just processes what you want, like I've put in here?
<?xml version="1.0"?>
<xsl:stylesheet version = "1.0"
xmlns:xsl = "http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:strip-space elements = "Report"/>
<big> <xsl:template match="/">
<xsl:apply-templates select="//Record"/>
</xsl:template></big>
<xsl:template match="Record">
<text>
</text>
<xsl:text/><xsl:value-of select="normalize-space(Record)"/><xsl:text/>
<xsl:value-of select="normalize-space(DateTime)"/>,<xsl:text/>
<xsl:value-of select="normalize-space(PointName)"/>,<xsl:text/>
<xsl:value-of select="normalize-space(PointValue)"/>,<xsl:text/>
<text>
</text>
<xsl:text disable-output-escaping = "yes" >
</xsl:text>
</xsl:template>
</xsl:stylesheet>
I'm presuming the use of DateTime, PointTime and PointValue in your XSL is a typo?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi all,
I will be involved in a project where I must translate multiple EDI formats into XML and vice versa? Rather than code all this which I suspect will be impossible as I will be constantly hit with new formats, I was thinking that my app should load an XSLT map with the rules for the translation. I can then create custom XSLT maps on demand. Now my questions before I start:
1. Looking on the web, it seems all articles on XSLT are now quite old so I am wondering if this technology has been superseded in .NET? If so, by what?
2. If I should use XSLT, what would be the best tools to create the maps? I think hand coding will be tough/a bore. By looking the on the web, it seems Stylus Studio is possibly the way to go?
I'm not really ridged in my thoughts here so happy if I need to go off in another direction.
Many thanks for any advice.
|
|
|
|