What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » XML and Metacharacters

XML and Metacharacters
Author: Message:
ArkaneArkade
Full Member
***

Avatar
The One and Only

Posts: 193
Reputation: 5
39 / Male / Flag
Joined: Mar 2007
O.P. XML and Metacharacters
Hey guys,

After my many sleepless nights trying to get XML working from the internet, I've finally discovered my problem.  The XML file I am taking the information from contains multiple metacharacters which just break the function.

Now my problem is, that I need to find a solution for this, as these offending metacharacters (�, �, ñ ) are actually needed for the script to work in some instances.

The xml file is http://www.arkanes-arkade.co.uk/x360/x360-db.xml .  All of the metacharacters are part of a node attribute, and are how the data is searched for, so I either need some way to make the xml work (currently has no encoding specified... if there is a way that would help) or to make both the script and the php script which generates the xml to convert the characters into readable ones (such as (TM), (R), (n) ) so that the script will work properly.

The script is getting the info from xniff, which is why the metacharacters are actaully needed, its not just a case of me being awkward (at least not intentionally).

Anyone got any suggestions for me?

Cheers guys,
Leroux

This post was edited on 11-17-2008 at 05:23 AM by ArkaneArkade.
[Image: adsig.jpg]
11-17-2008 05:19 AM
Profile E-Mail PM Web Find Quote Report
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
RE: XML and Metacharacters
You mean you're getting the XML file using Xniff?

You may as well use the XMLHTTP object.
11-17-2008 02:00 PM
Profile PM Find Quote Report
ArkaneArkade
Full Member
***

Avatar
The One and Only

Posts: 193
Reputation: 5
39 / Male / Flag
Joined: Mar 2007
O.P. RE: RE: XML and Metacharacters
quote:
Originally posted by SmokingCookie
You mean you're getting the XML file using Xniff?

You may as well use the XMLHTTP object.

God no!  Believe me, I'm using Xniff too much as it is.  It's my X360+ script - because Plus! can't actually detect when the XBOX Messenger changes PSM, Xniff listens for that, and gets the info through that.  It's the XBOX which sends the metacharacters, and so Xniff reads it raw.

The XMLHTTP is what I'm using to get the file, but if any of the metacharacters in it cause an "object required" error.
[Image: adsig.jpg]
11-17-2008 05:16 PM
Profile E-Mail PM Web Find Quote Report
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
RE: XML and Metacharacters
Have you saved the XML as Unicode (aka UTF-16)? If not, don't forget to alter the processing instruction:

code:
<?xml version="1.0" encoding="Unicode"?>

It may help..
11-18-2008 05:26 PM
Profile PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: XML and Metacharacters
quote:
Originally posted by SmokingCookie
Have you saved the XML as Unicode (aka UTF-16)?
It's even better to use UTF-16, as it's the official encoding declaration for this type of Unicode as stated here:
quote:
In an encoding declaration, the values "UTF-8", "UTF-16", "ISO-10646-UCS-2", and "ISO-10646-UCS-4" SHOULD be used for the various encodings and transformations of Unicode / ISO/IEC 10646, (...)
And we can better give script developers the most correct way to do it. :)
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
11-18-2008 05:36 PM
Profile E-Mail PM Web Find Quote Report
ArkaneArkade
Full Member
***

Avatar
The One and Only

Posts: 193
Reputation: 5
39 / Male / Flag
Joined: Mar 2007
O.P. RE: XML and Metacharacters
Cheers guys.  The encoding was indeed what the problem was.  I'd skipped adding the encoding into the xml previously because it was screwing things up, but I guess I'd had it wrong.

Anyway, all working now, so thanks :D
[Image: adsig.jpg]
11-18-2008 11:52 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On