Toad World® Forums

Errors creating XML Schema Definition File - Message Resolved


#1

Just a follow-up to one I posted some time ago where I always recieved the error below in a certain schema SDXML generation. I finally traced it down to a package with an embedded CHR(05) character that looks very similar to a pipe. Object type filters and then Object Set filters made the detective work pretty easy.

An error occurred while attempting to write the following
objects to the XML file. Some of their properties may not
be present in the file.

STR: Error - An invalid character was found in text content


#2

Yeah, there are some characters that I just can’t put in an XML file. The best workaround would be to code it as CHR(05) rather than the character itself.

From: chazamania [mailto:bounce-chazamania@toadworld.com]

Sent: Wednesday, February 12, 2014 2:00 PM

To: toadoracle@toadworld.com

Subject: [Toad for Oracle - Discussion Forum] Errors creating XML Schema Definition File - Message Resolved

Errors creating XML Schema Definition File - Message Resolved

Thread created by chazamania

Just a follow-up to one I posted some time ago where I always recieved the error below in a certain schema SDXML generation. I finally traced it down to a package with an embedded CHR(05) character
that looks very similar to a pipe. Object type filters and then Object Set filters made the detective work pretty easy.

An error occurred while attempting to write the following

objects to the XML file. Some of their properties may not

be present in the file.


#3

I do not know that article, but if you create XML file with header like:

<?xml version="1.0" encoding="UTF-8"?>

I’m pretty sure all kind of character may be inside XML doc.

But again, do not know on which initial topic poster is referencing.


#4

The files are UTF8 encoded, and that’s the first line of the file. I can put all kinds of “real” characters in there from any language, but the files still
don’t like certain characters like CHR(05).

From: damir.vadas_531 [mailto:bounce-damirvadas_531@toadworld.com]

Sent: Wednesday, February 12, 2014 2:10 PM

To: toadoracle@toadworld.com

Subject: RE: [Toad for Oracle - Discussion Forum] Errors creating XML Schema Definition File - Message Resolved

RE: Errors creating XML Schema Definition File - Message Resolved

Reply by damir.vadas_531

I do not know that article, but if you create XML file with header like:

<?xml version="1.0" encoding="UTF-8"?>

I’m pretty sure all kind of character may be inside XML doc.

But again, do not know on which initial topic poster is referencing.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.


#5

uf …does this helps-same ENQ char error in XML:

support.adeptia.com/…/23630537-Debugging-an-invalid-XML-character-error-


#6

The character was just part of a code comment that was probably pasted or was created with some fru-fru editor. I’ve never needed an ENQ or CHR(5) for PL/SQL. Finding the offending character has always been the issue since the error message doesn’t point to the offender. I just wanted to share the discovery approach, especially since I’ll probably forget it in a year or two and need to come back here to find it.


#7

Ah. I’ll add some detail to the message.


#8

Hmm…STR (the first word in the error message) is the name of the object causing the problem, is it not?


#9

Jeez. This is why we try to have naming conventions and coding standards. I assumed it was some STRing XMLish error, not the object name. Plus STR is a System Trouble Report in our organization and always documented in code comments so I’m apparently blind to it in any other context. Sorry for the goose chase.


#10

No problem. That goose was easy to catch. When I first saw your first post in this thread, I also thought STR was some XMLish error code. Then when I looked in our source, I saw that it was the object name! I added the object type before the name, so next time it will say “Package STR: Error - blah blah blah” instead.


#11

Not wanting to dive into the essence of this problem, but the XML standard says that not any character is valid, only #x9, [tag:xA], #xD, #x20#xD7FF, #xE000#xFFFD and #x10000#x10FFFF . So #x5 is definitely invalid at the XML level. But it can be encoded in the XML by writing � (numeric) or � (hex).

For instance, ab AB can also be written as ab AB.

My 2 eurocents…


#12

Right, and the tricky thing is that IDomDocument.createTextNode encodes everything else for me…it just seems to miss a few characters.


#13

OK, next beta, those characters won’t cause problems anymore.