convert BASDA format XML to "standard" XML

hiya, 

Many of my recent problems have been that I have found it difficult to get my head round using XSLT on BASDA format XML.I feel that it would be easier to convert the BASDA format to "standard" XML, then do my XSLT.
--BASDA snippet

<rows>
<row>
<FIELD NAME="PRODUCT-TYPE">CAR</FIELD>
<FIELD NAME="PRODUCT-DATE">01/01/2004</FIELD>
</row>
</rows>

--what I regard as "standard" XML...easier to work with.

<rows>
<row>
<PRODUCT-TYPE>CAR</PRODUCT-TYPE>
<PRODUCT-DATE>30/03/2004</PRODUCT-DATE>
</row>
</rows>

Is it posssible, via a tool or otherwise, to convert an XML file TO and FROM BASDA format?
Even if it isn't possible, it'd be nice to hear how the BASDA XML developers approach XSLT.
The worst case scenario I can imagine is that:
1) you create a custom XSLT to transform the BASDA format into "standard" XML.
2) Then , with your "nicely" formatted XML it is easier to write the XSLT that is necessary to actually do the processing.
3) create another custom XSLT to convert the processed Doc into BASDA, so that it can be written back to the source.
Therefore, steps #1 and #3 essentially convert the XML To and FROM BASDA format.
As far as I can see, it is more difficult to perform XSLT on BASDA format than on "standard" XML format...I'm just wondering how most of you approach it.
Thanks for any comment / URL's
yogi



buy an old van and drive round oz.
0
cyoker
1/14/2005 3:00:46 PM
asp.net.xml-datasource 7181 articles. 0 followers. Follow

8 Replies
1329 Views

Similar Articles

[PageSpeed] 45

depending on the application, it sometimes makes sense to have an internal standard fromat.

if you were receiving xml documents in BASDA format and also in say ORIGO format, or any others, converting them to a standard format means you only need to write one lot of import code.
0
richy_roo
1/15/2005 7:06:34 PM
hi Richy,


Does this mean that there no tools out there that will do this for me?
If not, then does it mean that I should write an XSLT that will convert the BASDA into "standard" XML?
cheers,
yogi
buy an old van and drive round oz.
0
cyoker
1/15/2005 8:08:21 PM
What are you trying to achieve?

does this xml get updated into a database?
could there be another XML or CSV or EDI format which you must implement to update to the same db?
thanks
0
richy_roo
1/15/2005 9:50:06 PM
hi Richy, 

At the moment, it is read-only, the problem is that if I keep it in BASDA format, when I bind to winforms datagrid the datagrid isn't displayed properly.
eg if I use the BADSDA XML

<ROW>
<FIELD NAME="PRODUCT-TYPE">CAR</FIELD>
<FIELD NAME="PRODUCT-DATE">01/01/2004</FIELD>
</ROW>
<ROW>
<FIELD NAME="PRODUCT-TYPE">BIKE</FIELD>
<FIELD NAME="PRODUCT-DATE">01/01/2003</FIELD>
</ROW>

then the datagrid is displayed as follows:

dgHeader --> ROW ¦Name_Text
PRODUCT-TYPE ¦CAR
PRODUCT-DATE ¦01/01/2004
PRODUCT-TYPE ¦BIKE
PRODUCT-DATE ¦01/01/2003


I want the datagrid to display as follows:

dgHeader --> PRODUCT-TYPE ¦PRODUCT-DATE
CAR ¦ 01/01/2004
BIKE ¦ 01/01/2003

So, somehow the BSADA format isn't handled correctly by the standard databinding.It's quite hard to explain :-0. Sorry abouth the formatting.Am I making sense?
cheers,
yogi






buy an old van and drive round oz.
0
cyoker
1/16/2005 1:34:53 PM
In which cas it probably makes sense to convert it, either using XSLT or in code, put it into a datatable (create one in code) using the xmldom to read the basda format.
0
richy_roo
1/16/2005 8:41:43 PM
hi Richy, 

I have been trying to convert it, with little joy.
I'll post as separate thread.
cheers,
yogi

buy an old van and drive round oz.
0
cyoker
1/17/2005 12:32:04 PM

I want to convert my database data to BASDA Format using C# or VB.NET. From where i can get the code to do this conversion


Shawinder Pal Singh
+919815071007
0
shawinder
8/2/2007 3:30:34 PM

You can use XSLT to convert XML to XML no matter what type of XML it is. XML is XML

 


If I was helpful, please mark "answered" so I can get credit. Thanks!
0
Bonekrusher
8/4/2007 4:24:51 PM
Reply:

Similar Artilces:

"XML page cannot be displayed" added to XML Download
I'm using these lines to initiae a download of an xml file.  Response.Clear()Response.ContentType = "application/octet-stream"Response.AddHeader("Content-Disposition", _"attachment; filename=""" & varFileName & """")Response.Flush()Response.WriteFile(varFileName)   File looks fine in XML viewer just after created. But the output of the download, when viewed as XML, has the following, fully formatted http error imbedded in it:   XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh butto...

datawindow.import(XML!,"file.xml") syntax error
I am using Pocket PowerBuilder 1.5 build 360 from the help file I saw [ImportFile method (DataWindows)] long dwcontrol.ImportFile ( {saveastype importtype}, string filename {, long startrow {, long endrow {, long startcolumn {, long endcolumn {, long dwstartcolumn } } } } } ) This statement inserts all the data in the file D:\TMP\EMPLOYEE.CSV into dw_employee starting at the first column: dw_employee.ImportFile("D:\TMP\EMPLOYEE.CSV") This statement inserts all the data in the file D:\TMP\EMPLOYEE.XML into dw_employee starting at the first column: dw_em...

superreview requested: [Bug 219355] XML Parsing Error: undefined entity on files with Mime-Type: application/xhtml+xml, including about:, or "text/xml" : [Attachment 131594] use NS_GRE_DIR
Benjamin Smedberg <bsmedberg@covad.net> has asked Darin Fisher <darin@meer.net> for superreview: Bug 219355: XML Parsing Error: undefined entity on files with Mime-Type: application/xhtml+xml, including about:, or "text/xml" http://bugzilla.mozilla.org/show_bug.cgi?id=219355 Attachment 131594: use NS_GRE_DIR http://bugzilla.mozilla.org/attachment.cgi?id=131594&action=edit ...

superreview granted: [Bug 219355] XML Parsing Error: undefined entity on files with Mime-Type: application/xhtml+xml, including about:, or "text/xml" : [Attachment 131594] use NS_GRE_DIR
Darin Fisher <darin@meer.net> has granted Benjamin Smedberg <bsmedberg@covad.net>'s request for superreview: Bug 219355: XML Parsing Error: undefined entity on files with Mime-Type: application/xhtml+xml, including about:, or "text/xml" http://bugzilla.mozilla.org/show_bug.cgi?id=219355 Attachment 131594: use NS_GRE_DIR http://bugzilla.mozilla.org/attachment.cgi?id=131594&action=edit ...

XMl to XML
Hello,   I retrieved an XML from the dataset which retrieves data from the table in the database. I need to present the data  in a different structure. Is XSLT the way or are there any other options. please let me know. Thanks!! Yes XSLT is a good choice to convert xml file to other forms. You can take a look at XSLT Tutorial.Sincerely,Young Fang...

XML in, XML out
Hi All (and a happy holiday to those that will get a break), I am trying to read in an XML file of addresses. I need to remove all the address data from the file where code =~ /^000/ (there are none in the example data below). I need to reproduce that data 'as is', so I need to honour the tag structure, although the order of the tags doesn't need to be honoured. I have been trying to use XML::Simple and I had a go with XML::Smart but I haven't been able to get the results I want. My best effort is below (with XML::Simple). There are a couple of differences ...

How to read the xml returned by select query with "For XML Auto,Elements"
Hi all,  I am writing a select query which produces huge xml data.Now i want to read that data from my web application a save it as xml file. How can i do that. I am using asp.net vb.net.  Check if this post is helpful.http://forums.asp.net/t/1182514.aspx Thanks,Dhimant Trivedi"When the going gets tough, tough gets going.""Mark as Answer" the post(s) which helped you solve the problem...

When I get .XML document with Request.Form["xml"].ToString(); it gets error.
XmlDocument xmlDocument = new XmlDocument(); xmlDocument.LoadXml(Request.Form["xml"].ToString());  I want system doesn't interrupt the code execution. How can I do system doesn't give error message?  Thanks.  Error Message  A potentially dangerous Request.Form value was detected from the client (xml="...8859-9" ?><BORCELIK><Tarih>09/...").  ...

Setting xml attribute "use=required" property when generating xml from PDM
I am generating an XML schema from a physical data model, and had hoped that the attributes generated would have the property "use=required" set, if the column in the related table was set to mandatory. However, this does not happen. Can anyone advise me how to get this property set, or would I have to use an Extended Model Definition to achieve this? And if so, any suggestions on how to go about getting this done? Thanks Guy ...

"Attempt to use an "XML" extension that has not been registered..."
Hello, I am using Reporting Service in server mode.I currently have a report in which in include a few subreports. All of them use the same datasource (sqlserver 2005 database connectionstring)I have to add another report which is based on XML data. To do so, I created a new shared datasource, designed my query, added the report parameters, tested the query... This works but when I try to deploy this report on the report server I am getting an error I do not understand:"Attemps to use an "XML" extension of data that has not been registered for this report server"I do...

how i can insert xml result whitch obtained with "for xml" into one field of table
hello how i can insert xml result whitch obtained with "for xml" into one field of table for example insert into table1 select * from table2 for xml...

Error: invalid format "XML"
Hi, I am trying to output a result set to XML format. The documentation says it works something like this : Output to c:\test.xml Format XML I try this but I get an Error : ***Error: invalid format "XML" Am I doing something wrong? Thanks, Veselin Veselin, are you using the DBISQLC utility? AFAIK, this legacy C-based tool does not support the "newer" output formats like XML. If so, then you will have to use the Java-based DBISQL. HTH Volker "Veselin Ivanov" <vs@sonita.com> wrote innews:4936294f$1@forums-1-dub... > Hi, &...

If xml doc has multiple namespace "xmlns", how should xslt be built in order to display the content of xml doc?
Hi Guys,  If xml doc has multiple namespace "xmlns", how should xslt be built in order to display the content of xml doc? Thanks. The following is the example:  <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="report.xsl"?> <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition"             xmlns:rd=http://schemas.microsoft.com/SQLServer/reporting/reportdesigner> <BottomMargin>0.5in</BottomMargin> <RightMargin>0.25in</R...

superreview requested: [Bug 344362] xsl:output omit-xml-declaration="no" does not create an XML declaration : [Attachment 229231] v1
Peter Van der Beken <peterv@propagandism.org> has asked Jonas Sicking <bugmail@sicking.cc> for superreview: Bug 344362: xsl:output omit-xml-declaration="no" does not create an XML declaration https://bugzilla.mozilla.org/show_bug.cgi?id=344362 Attachment 229231: v1 https://bugzilla.mozilla.org/attachment.cgi?id=229231&action=edit ...

Web resources about - convert BASDA format XML to "standard" XML - asp.net.xml-datasource

Resources last updated: 12/17/2015 12:39:38 AM