Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Madbit XML Plugin

Author
Message
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 17th Jun 2013 19:24
OK, the old thread got locked so I have to make a new one.

I just wanted to know if there is a way to return the line number of an XML element.

Suppose there is an error in the XML at a certain element; how could I figure out this line number if it possible for XML to contain identical element data?

MadBit
VIP Member
Gold Codemaster
17
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 19th Jun 2013 10:35 Edited at: 19th Jun 2013 10:35
Hmm, the short answer is: No!

The XML engine reads the entire XML file and stores the elements in a list. So you do not have access to the 'XML Source' and appropriate error handling is missing.

The engine is designed for standard XML files. So I recommend to use a good editor to finds the error when editing or saving.

I use Microsoft's XML Notepad. It is a free tool.

Share your knowledge. It's a way to achieve immortality. (Tenzin Gyatso)
Pixie-Particle-Engine
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 19th Jun 2013 14:13
OK, don't worry; I'll add name attributes to the elements so sources of errors can be found.

I use the Visual Studio XML designer with XML schema; but it is not always me who will be creating these XML files; third parties can create MODs for my game.

Thanks

Login to post a reply

Server time is: 2026-07-06 18:35:45
Your offset time is: 2026-07-06 18:35:45