GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Question for XML Gurus (https://gfy.com/showthread.php?t=1321222)

2MuchMark 12-20-2019 01:30 PM

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?

machinegunkelly 12-20-2019 01:58 PM

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 )

just a punk 12-20-2019 02:33 PM

Indeed. The browser shows it like that.

2MuchMark 12-20-2019 11:25 PM

Quote:

Originally Posted by machinegunkelly (Post 22581878)
Are you sure you're seeing <something> and not <something/> as a self closing tag ?
XML Spec converts <something></something> to <something/>

Yes.

Quote:

Originally Posted by machinegunkelly (Post 22581878)
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 )

Thanks for the suggestion. I tried a space, but it did not work.


Quote:

Originally Posted by CyberSEO (Post 22581915)
Indeed. The browser shows it like that.

Do you mean it is SUPPOSED to show it like that? It is normal?

myleene 12-21-2019 01:05 AM

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:

Is it illegal to have no character between arguments in .xml?
It's not illegal. But your application may not handle that correctly.

PornDiscounts-V 12-21-2019 02:38 AM

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.

zerovic 12-21-2019 02:45 AM

Hi,

there's not much I can do without seeing the actual xml.. can you share the xml we are talking about?

Cheers,
z

k0nr4d 12-21-2019 04:31 AM

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.

zerovic 12-22-2019 07:08 AM

Quote:

Originally Posted by k0nr4d (Post 22582192)
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.

Exactly. :2 cents:


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