![]() |
Question for XML Gurus
Help! I'm stuck.
I have an xml file that contains a parameter that looks like this <something></something> I see this plain as day in the notepad editor. But my application isn't working and when I check the .xml file in a browser, I see only this <something> with no closer. </something> portion is missing. BUT, if I insert any character between them like this: <something>1</something> then the browser reads it correctly. Is it illegal to have no character between arguments in .xml? |
Are you sure you're seeing <something> and not <something/> as a self closing tag ?
XML Spec converts <something></something> to <something/> A simple space in the element should get you around this error. ( I can't be much help after this, just something I've run into before ) |
Indeed. The browser shows it like that.
|
Quote:
Quote:
Quote:
|
XML files can contain elements or attributes.
Which kind of item is it? I believe this may help: https://stackoverflow.com/questions/...l-xml-elements Your application may actually handle null values differently. If that doesn't work, I would refer to the docs of the application to confirm how it handles "empty" or "null" values. It's unclear which one you wish to handle in your first post. Quote:
|
Might depend on your parser... Is it asking for something to be in between and a \s (whitespace character) isn't good enough to return true?
Might be that it is asking, true or false? and only "something" returns true. |
Hi,
there's not much I can do without seeing the actual xml.. can you share the xml we are talking about? Cheers, z |
It's the actual contents of the XML that matter, not what your browser displays. What you see under "view source" when viewing xml in browser is what really matters.
|
Quote:
|
All times are GMT -7. The time now is 03:48 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123