Jump to content

Hidden hex chararcters on xml page


MyronCope

Recommended Posts

Hi all,I have a program that is taking several xml documents, loading them with vb.net code and creating one master xml document. Next, I'm taking this master xml document and with the help of xsl I am creating a transformed xml document (which I will call transform.xml).We are taking transform.xml and submitting it to an online publication site. This online site first parses transform.xml and then if all looks good then submits the document into their system. Transform.xml parses well except for one problem:There are hidden hexadecimal characters that are somehow placed before the first opening element (before the first "<"). They are hidden in the sense that you cannot see these characters but if you use hex viewing or parsing software then you can view these characters.I'm not sure how these characters are being placed there but I would like to try to figure out how to avoid this. The characters are:Hex: EF BB BFDec: 239 187 191i >> (upside-down question mark)When I open result.xml and then save it these characters go away, but I'm trying to avoid this manual step so that the process is more automated. It looks like there is some formatting in the original xml documents that I load in my vb.net and my guess is that this is somehow being copied into hex, but this is only a guess.My question is, has anyone come across this or have any insight into how I can avoid this, either in the Vb.net code or xsl? Any feedback appreciated. Let me know if you need to see code or xsl.

Link to comment
Share on other sites

I found that these hex chars appear to be the BOM Byte Order Mark, hidden chars that are included in an xml file and for some reason Java cannot deal with these chars (seems to be a bug in the Java language). So it looks like I will have to find a way in my vb.net code to read the xml file and replace the BOM characters when I see them.If anyone has done this before let me know.

Hi all,I have a program that is taking several xml documents, loading them with vb.net code and creating one master xml document.  Next, I'm taking this master xml document and with the help of xsl I am creating a transformed xml document (which I will call transform.xml).We are taking transform.xml and submitting it to an online publication site.  This online site first parses transform.xml and then if all looks good then submits the document into their system.  Transform.xml parses well except for one problem:There are hidden hexadecimal characters that are somehow placed before the first opening element (before the first "<").  They are hidden in the sense that you cannot see these characters but if you use hex viewing or parsing software then you can view these characters.I'm not sure how these characters are being placed there but I would like to try to figure out how to avoid this.  The characters are:Hex:  EF BB BFDec: 239  187  191i          >>      (upside-down question mark)When I open result.xml and then save it these characters go away, but I'm trying to avoid this manual step so that the process is more automated.  It looks like there is some formatting in the original xml documents that I load in my vb.net and my guess is that this is somehow being copied into hex, but this is only a guess.My question is, has anyone come across this or have any insight into how I can avoid this, either in the Vb.net code or xsl?  Any feedback appreciated.  Let me know if you need to see code or xsl.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...