Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Xmlize hates spaces
Xmlize hates spaces [message #25996] Wed, 24 March 2010 16:58 Go to next message
koldo is currently offline  koldo
Messages: 3357
Registered: August 2008
Senior Veteran
Hello Mirek

Xmlize hates spaces in .exe name and in variable names.

If the .exe file name has spaces, for example "My program.exe", StoreAsXMLFile() saves .xml file with this header:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE My program>
<My program>
...


LoadFromXML() cannot parse this Sad


The same for this. If a variable is xmlized like this:

void MyClass::Xmlize(XmlIO xml) {
	xml
		("my var", myVar)
	;
}


StoreAsXMLFile() saves it without any error.

<my var value="1100"/>


But LoadFromXML() cannot parse this Sad

If this cannot be fixed in LoadFromXML(), at least StoreAsXMLFile() could return an error or throw an exception.


Best regards
Iñaki
Re: Xmlize hates spaces [message #25999 is a reply to message #25996] Wed, 24 March 2010 18:32 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

AFAIR XML specification denies spaces inside tag or attribute name. So this is not a U++ bug, it is an XML feature Smile
Re: Xmlize hates spaces [message #26000 is a reply to message #25999] Wed, 24 March 2010 21:19 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3357
Registered: August 2008
Senior Veteran
Mindtraveller wrote on Wed, 24 March 2010 18:32

AFAIR XML specification denies spaces inside tag or attribute name. So this is not a U++ bug, it is an XML feature Smile

Hello Mindtraveller

The first case is spaces in .exe file name. This name is xmlized by Xmlize internally, without programming it. The programmer that uses Xmlize has no chance about it.

About the second case, StoreAsXMLFile() works but LoadFromXML() fails. It would be good if StoreAsXMLFile() would detect it.


Best regards
Iñaki
Re: Xmlize hates spaces [message #26029 is a reply to message #26000] Fri, 26 March 2010 16:54 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Well, about second, I do not think it is worth fixing.

I will fixt the program name issue.

Mirek
Re: Xmlize hates spaces [message #26042 is a reply to message #26029] Fri, 26 March 2010 19:44 Go to previous message
koldo is currently offline  koldo
Messages: 3357
Registered: August 2008
Senior Veteran
Thank you.

Best regards
Iñaki
Previous Topic: charset conversion
Next Topic: How to program real U++ applications
Goto Forum:
  


Current Time: Fri Apr 26 22:37:43 CEST 2024

Total time taken to generate the page: 0.02941 seconds