INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

XML Mystery

XML Mystery

(OP)
I have an XML file that I can open with the MS Native XML editor
BUT, I cannot edit it.  So I copied it into Notepad and edited it there.  BUT, once I save it out it cannot be read by the MS Editor nor does it work.  

The file works just FINE without changes; BUT, even if I copy it to notpad and make NO changes at all and just save it, it neither works nor does it show up in the editor -- comes up blank.

Furstrating and WEIRD to the max....
any ideas?

RE: XML Mystery

May be a character set issue.

Using a hex dump routine, what are the first few characters of the file (in hex)?

Tom Morrison
Micro Focus

RE: XML Mystery

(OP)
File that works:

3C 3F 78 6D 6C 20 76 65 72 73 69 6F 6E 3D 22 31 2E

File that fails:

3C 3F 78 6D 6C 20 76 65 72 73 69 6F 6E 3D 22 31 2E

RE: XML Mystery

Well, that's not it then.  Hmmm...

RE: XML Mystery

Why are you *copying it over* to Notepad?
That's not how you do it.

Open it *with* Notepad or get yourself Notepad++ and open it with that.
You should do fine then.
http://notepad-plus-plus.org/

"We had to turn off that service to comply with the CDA Bill."
- The Bastard Operator From Hell

RE: XML Mystery

(OP)
Thanks for your response -- My bad; apparently I gave the wrong impression - I AM opening it with notepad and have tried several other text editors -- and then simply saving it WITHOUT making any changes whatsoever -- except for the name, of course.

[Now before we go down another rabbit hole, the only change to the name is on  this order:

Original name:  filename.xml

Copy name: filenameb.xml  

You get the idea -- I am NOT blowing the extension, filetype, etc.]

Result:  file no longer functions and cannot even be viewed in a browser...

Like I said, this is a new one on me -- one of those, "this will only take a minute" turns into 2 days of WTF! deals.
 

RE: XML Mystery

I see.
Well, browsers do validate XMLs before displaying them. What error does the Browser throw?
Also, have you run the file through a XML verifier to check what part of the XML exactly turns to poo?

My best guess:
Is the XML UTF-8 encoded?
If so: Remove - or add - the BOM and retry.



 

"We had to turn off that service to comply with the CDA Bill."
- The Bastard Operator From Hell

RE: XML Mystery

(OP)
Browser throws NO error -- simply displays blank page -- true for both FF and IE

Original file IS UTF-8 and displays and functions just fine but I despite that I have already tried with: UTF-8

and: <?xml version="1.0" ?>  -- as per W3C

W3C XML Validator only says "unable to validate due to errors" -- but NO CLUE as to what and where errors are -- about as useful as pinning a note to your chest to tell you that you are dead...

Visually, files appear identical and have the same [13K] size -- but, of course that is NOT a CRC check and only gets the size "close"; not guaranteeing an exact character for character match.

Have opened in a HEX editor and files are identical for about the first 100 characters -- hate to think the ONLY solution is to do each and every one -- BTW, looked at both top and bottom with same HEX match...

Have also rebooted system and tried in both Win XP-Pro and Win7 OS with same [non] results...


 

RE: XML Mystery

Are these files top secret or can you post snippets of the head here?
Is the file linked to a schema and/or a XSL perhaps?
 

"We had to turn off that service to comply with the CDA Bill."
- The Bastard Operator From Hell

RE: XML Mystery

Well, the second one does throw an error.
Where does that CDATA Segment come from? How did it get into this file?
These two files are certainly not the same file anymore - structure-wise!
And the tag before the introduced CDATA is missing its closing tip bracket.

"We had to turn off that service to comply with the CDA Bill."
- The Bastard Operator From Hell

RE: XML Mystery

Any update on this issue?

"We had to turn off that service to comply with the CDA Bill."
- The Bastard Operator From Hell

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close