Define Data Type in XML FIle

Hi

Can anyone tell me if there is a way to define a data type in an XML file prior to loading it into the XML Database Binding Wizard?
I am constantly evolving the data for a large project and each time I change the XML file I also have to go in and keep resetting the data types for the fields in the wizard.
I know it doesn't sound like much of a chore but if I forget a slight change then the project development stops for a while as I try to find a fault again.

I have tried formatting like this: <DueDate dt="date"/> but it keeps coming up in the wizard as type "IXMLDueDateType" with a sub-setting of datatype Integer.

Any pointers much appreciated
0
Bob
2/25/2015 1:52:10 AM
embarcadero.delphi.xml 291 articles. 0 followers. Follow

3 Replies
741 Views

Similar Articles

[PageSpeed] 34

Bob Spencer wrote:

> Hi
> 
> Can anyone tell me if there is a way to define a data type in an XML
> file prior to loading it into the XML Database Binding Wizard?  I am
> constantly evolving the data for a large project and each time I
> change the XML file I also have to go in and keep resetting the data
> types for the fields in the wizard.  I know it doesn't sound like
> much of a chore but if I forget a slight change then the project
> development stops for a while as I try to find a fault again.
> 
> I have tried formatting like this: <DueDate dt="date"/> but it keeps
> coming up in the wizard as type "IXMLDueDateType" with a sub-setting
> of datatype Integer.
> 
> Any pointers much appreciated

Don't you have a XML schema for the XML data file? Importing a schema
instead of a data file tends to work better in the wizard and gives you
more control over the data types.

-- 
Peter Below (TeamB)
0
Peter
2/25/2015 7:03:14 PM
Hey Peter

Thanks for the reply
I am most definitely new to the use of these types of files and am yet to learn about the Schema files and how they are created.
Ill research them and see how I go.
It would be good to see a design flow map showing how all of these things fit together in this programming environment.

Thanks for the help.

Cheers

> {quote:title=Peter Below wrote:}{quote}
> Bob Spencer wrote:
> 
> > Hi
> > 
> > Can anyone tell me if there is a way to define a data type in an XML
> > file prior to loading it into the XML Database Binding Wizard?  I am
> > constantly evolving the data for a large project and each time I
> > change the XML file I also have to go in and keep resetting the data
> > types for the fields in the wizard.  I know it doesn't sound like
> > much of a chore but if I forget a slight change then the project
> > development stops for a while as I try to find a fault again.
> > 
> > I have tried formatting like this: <DueDate dt="date"/> but it keeps
> > coming up in the wizard as type "IXMLDueDateType" with a sub-setting
> > of datatype Integer.
> > 
> > Any pointers much appreciated
> 
> Don't you have a XML schema for the XML data file? Importing a schema
> instead of a data file tends to work better in the wizard and gives you
> more control over the data types.
> 
> -- 
> Peter Below (TeamB)
0
Bob
2/25/2015 10:50:04 PM
Bob Spencer wrote:

> Hey Peter
> 
> Thanks for the reply
> I am most definitely new to the use of these types of files and am
> yet to learn about the Schema files and how they are created.  

Well, *you* create them. A XML schema defines the structure of an XML
data file, names the entities that are allowed in the file, specifies
explicit data types for attributes and data held in the node text, and
so on. The XML schema language is itself a XML application, and the
specification for it already defines a number of common data types and
how they have to be represented in XML data files that conform to the
schema.

If you are like me and prefer printed paper to reading docs in a
browser I suggest you get a book like "XML in a Nutshell"
(http://www.amazon.com/Nutshell-Third-Edition-Elliotte-Harold/dp/0596007
647). The specs are of course also available online, start here:
http://www.w3.org/TR/xmlschema-0

The schema can be used to validate an XML file, but it also allows the
XML data binding wizard to create a better wrapper for the particular
XML.



-- 
Peter Below (TeamB)
0
Peter
2/26/2015 8:16:45 PM
Reply:

Similar Artilces:

Select XML Data type (xml) from sql server 2005 and then save to a XML file on local machine?? Help !
Hi All  I have a problem i am selecting a row of data from a database, within that row is a column in which i build up a xml in a stored procedure, it creates an xml and stores it in the column name xmldata which is of xml datatype. This works great My problem is how do i now create a xml file on my local machine with that data, below is what i have so far :- Dim conn1 As New SqlConnection()conn1.ConnectionString = (ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString) conn1.Open()Dim DBCmd As New SqlCommand Dim DataRecieved As SqlDataReaderDBCmd...

How to read XML file that's not of .xml file type?
In my app, I'm getting an error because the XML file I'm accessing is not of the .xml file type. The file I'm accessing is: http://p.moreover.com/cgi-local/page?c=ASP%20news&o=xml_1 Is there anyway I can work around this to make the file accesible? The line of code I'm using to read the XML file is below FS = New FileStream("http://p.moreover.com/cgi-local/page?c=ASP%20news&o=xml_1",FileMode.Open,FileAccess.Read) 'prince I don't think you can open file via HTTP using FileStream. FileStream works with file system paths. Try HttpWebRequest instead (HttpWe...

XML Transform to 1 XML file to another XML File
Hello All  I am a novice programmer. I want to transform 1 xml file to another xml file. I am looking for a example code where user will select source xml file and create another xml file in different file with different fields with some default validation of parsing date and default values.  Can anyone help me or let me know any available source code in C#/ASP.Net?  Ms Disha I am assuming you know xslt, if not, you would have to go look at that.  But if you do, then this document will help you out http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=...

Retreive xml data from sql 2005 xml data type column
 hi everyone, I am in a messy situation and dieing to get rescued.I have a database with an untyped  xml datatype column named xmlfile.  The xml inside is invoice of customer & looks like this.<User><INVOICE><BILL Time="May 18 2008 12:47AM">0.1869</BILL><BILL Time="May 18 2008  1:00AM">22.25</BILL><BILL Time="May 18 2008  1:00AM">22.25</BILL></INVOICE></User>I wanted to retrieve the <BILL></BILL> Elements and put it through asp:datagrid or asp:repeater . I w...

Read XML data from SQL Server XML data type field
Hi,does anyone actually use the XML data type for SQL Server database columns? I can't really find any help for my problems.In my database there is a table with personal data such as name, telephone and so one. One of the columns is of type XML, because I need to store multilingual data in there, something like:<career>     <careertext lang="en">My career</careertext>    <careertext lang="de">Meine Karriere</careertext></career>I'm using a Stored Procedure to retrieve all data from the database and in my data access object th...

Help with xml data into xml file
I have some xml data that comes from a web service . I want to write that xml data into xml file.  Could any one please post some samples   thanks Cemal   Please disregard, I found the solution. Try below code   FileStream fs = new FileStream(Server.MapPath("~/myxml.xml"), FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite);            StreamWriter sw = new StreamWriter(fs);            sw.Write(ValueReturnFromWEbService); &nbs...

Pulling data from one xml file based on values in a second XML file
Alright, I'm programming using vb within asp.net, but I'm a little bit of a newbie when it comes to xml. What I'm trying to do is display particular information from an XML file (parts.xml) based on information in another XML file (orders.xml). Ideally, I'd like to display the info using the xml control within asp.net and an xsl stylesheet. The setup of the files is that within parts.xml, each part has an id attribute. I'd like to grab the part id from the orders.xml file, and use it to extract only information on specific parts from parts.xml. Is there an easy way to do this? Any help...

Sending XML data file to the XML channel
------_=_NextPart_001_01C885CF.D5FD4070 Content-Type: text/plain; charset="us-ascii" content-transfer-encoding: quoted-printable Hi, I want to push XML data file to the XML channel, please find the code snippet for the same. ######## #!/usr/bin/perl use LWP::UserAgent; my $browser =3D LWP::UserAgent->new; my $url =3D 'http://xxx.xxx.xxx.xxx:xxxxx'; open(FILE,"display.xml"); my @data=3D<FILE>; my $response =3D $browser->post( $url, Content =3D> @data ); print @data; ######## When I print @data,...

XML Mapper can not read data from XML files
I've managed to create Web Service applications using Delphi .NET, then I want to access webmethod published by the Web Service. Now I've made a new project in Delphi for Win 32. Within this project I use THTTPRIO to access the WebService. All the configurations I've given and all work properly. Of this application I've managed to produce an XML file. This file produced by AfterExecute event from THTTPRIO object. Problems arise when I want to create a transformation file using XML Mapper. I've selected some of the nodes that I need. However, when I want to press the...

how to display data from xml file / xml webservice in gridview?
 hi how can I make a gridview display data from a xml file or a xml webservice?thanks  It's very easy. Drop XmlDataSource onto your page, and call it XmlDs. and in your page, when you get xml, bind it as follows:XmlDs.Data = xmlString;XmlDs.DataBind();GridView1.DataSourceID = "XmlsDs";GridView1.DataBind();TalhaMCP, MCADPersonal Site  hi , First make return type of web method as Dataset. Then at client sidetypecast returning  result with dataset. And assign that dataset to gridview like: gridview1.datasource= dsxml.tables(0).defaultview;gridview1.dat...

How do I retrieve the image out of the xml data I get from the xml file
How do I retrieve the image out of the xml data I get from the xml fileAs shown in the example.<?xml version="1.0" encoding="utf-8" ?> <maps>      <image>!^asfd*#dsafdasfas@$dsfh.......</image></maps> It's likely that the bytes of the image have been Base64 encoded.  In order to take that Base64 string and create an image from it, do the following:   byte[] b = Convert.FromBase64String(yourBase64StringHere);    System.IO.MemoryStream ms = new System.IO.MemoryStream(b);    Syste...

Save SQL XML field type to a xml file
Hi, I have a table which holds raw xml in a field with type XML. How do I export that XML field to an XML file? Thanks Bones If I was helpful, please mark "answered" so I can get credit. Thanks! You can do by using CLR based stored procedure. Here is a link. http://www.sqldbatips.com/showarticle.asp?ID=23  Farooq Kaiser, MCTS, MCPPlease Mark As Answer if my answer helped you.http://www.Fairnet.com Thanks for the help but unfortunitly this is for an other version on .NET. When I try to compile the .DLL I get the errors for "File.WriteAll" and...

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 ...

Web resources about - Define Data Type in XML FIle - embarcadero.delphi.xml

Use-define chain - Wikipedia, the free encyclopedia
A Use-Definition Chain ( UD Chain ) is a data structure that consists of a use, U, of a variable , and all the definitions, D, of that variable ...

How Do You Define Social TV?
“ Twitter owns social TV . Facebook is trying to get there.” Joseph Pigato, managing director of customer-engagement firm Sparked , spoke those ...

Define American (@DefineAmerican) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

OK, Now Define “Answered”
One thing we’ve learned on Stack Overflow is that asking questions is easy. But how do you tell when a question has been answered? For a community ...

Define: for iPhone 3GS, iPhone 4, iPhone 4S, iPod touch (3rd generation), iPod touch (4th generation) ...
Read reviews, get customer ratings, see screenshots, and learn more about Define: on the App Store. Download Define: and enjoy it on your iPhone, ...

Kendrick Lamar defines HiiiPower & having a vision of 2pac - YouTube
During our interview with Kendrick Lamar he gives the concept behind HiiiPower plus elaborates on having a vision of 2pac. Check the complete ...

Legislation to define exactly what metadata will be stored for law enforcement and spies
The Abbott government has attempted to put an end to the heated debate over proposed data retention regime by promising to spell out in law what ...

Gallipoli not the only war to define Australian warfare
As an Aboriginal person who had family serve in World War I, I am acutely aware that there are many Aboriginal families who had relatives who ...

How to define the scope of a project - risk register, risk log, project scope, PMO, risk management ...
As a project manager, you'll need to define project scope no matter what methodology you choose to use.

Ten stylish men who define effortless cool
... published on D'Marge . An American Supreme Court Justice once famously said of obscenity, "I shall not today attempt further to define the ...

Resources last updated: 12/16/2015 9:48:31 PM