X-NODEREF ... SET-ATTRIBUTE got an error: An invalid character was specified. (9082)

Boomn4x4

New Member
I'm trying to generate an XML file, and I'm using the XML documentation from Progress... but am running into an error I cannot figure out (FYI.. I'm pretty new to both XML and Progress).

My code is as follows
Code:
def var hDoc as handle no-undo.
def var hSale as handle no-undo.
def var hTran as handle no-undo.
def var hSaleData as handle no-undo.
def var hLineItem as handle no-undo.
def var hTotal as handle no-undo.

create X-DOCUMENT hDoc.
create X-NODEREF hSale.
create X-NODEREF hTran.
create X-NODEREF hSaleData.
create X-NODEREF hLineItem.
create X-NODEREF hTotal.

hDoc:CREATE-NODE(hSale, "SALE", "ELEMENT").
hDoc:APPEND-CHILD(hSale).

hDoc:CREATE-NODE(hTran, "TRANSACTION", "ELEMENT").
hSale:APPEND-CHILD(hTran).
hTran:SET-ATTRIBUTE("Customer Name", string("Joe Smith")).

hDoc:SAVE("LONGCHAR", longstring).

I get the following error:
X-NODEREF or X-DOCUMENT SET-ATTRIBUTE got an error: An invalid character was specified. (9082)

Any help would be appreciated.
 

Boomn4x4

New Member
Re: X-NODEREF ... SET-ATTRIBUTE got an error: An invalid character was specified. (90

Answered my own question.... The "invalid character" was the SPACE between 'Customer' and 'Name'... XML doesn't permit spaces in attribute names.
 
Top