Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML Order?

Status
Not open for further replies.

navkhangura

Technical User
Oct 27, 2008
2
GB
Hi, I am new to XML and am having a few problems.

I am using a translator to convert a .txt file into a .xml file. We have been given an updated translator and have noticed that the .xml file is not executing correctly.

The only difference in the .xml file is a small part of the order.

It is supposed to be like this:

<vofile>XPOSE</vofile>
<rate>0</rate>
<fxno>1</fxno>
<tran>0</tran>

But it is now appearing like this:

<fxno>1</fxno>
<rate>0</rate>
<vofile>XPOSE</vofile>
<tran>0</tran>

The question is; does the order of the XML affect the execution?

Thanks in advance!

Nav
 
If the XML file is being validated against a DTD/XSD, and that DTD/XSD specifies that XML elements must be specified in a certain order then yes it would effect it.

For clarification, what are you doing with the XML file after converting it from .txt (i.e. can you describe what you mean by "the .xml file is not executing correctly)?

Clive
Runner_1Revised.gif

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
Hi Clive,

Thanks for your reply. I do not know much about the validation of the XML. I do not write the XML files, I am just using them within a program.

The XML files (translated from .txt) are playlists for tv broadcasting and are inserted into a program that uses XML files. The program is used by operators in the automation section of tv broadcasting.

Sorry if that is confusing!! But you answer helps me, I believe the order of the XML that has changed is affecting the execution due to the file that XML is calling (<vofile>XPOSE</vofile>) is not running. As it is first in the file that works and third line in the file that doesnt work, this was my main concern!

I hope that makes sense.

Nav
 
Hi Nav,

Thanks for a bit of background info.

Does the target program (i.e. the one used by operators in the automation section of tv broadcasting) specify a format for XML input? I would think it should do.

If so, that would provide you with enough information to confirm the order in which the XML elements should be specified.

Clive
Runner_1Revised.gif

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top