I search for a solution to get the following results:
The xml-Dokument should have a header like this:
<?xml version="1.0" encoding="ISO-8859-1" ?>
Some nodes should have the extension "type.." or "version.."
<PARTY_ID type="buyer_specific">0662406</PARTY_ID>
or
<ORDERRESPONSE version="1.0">
How can i specialize a node like this?
Thx for your input..
Rallnus (Yamaha FJ1200 - '89 / 25th anniversary was great!)
0
Answers
Attributes, such as "type" in your example, can most easily be set using the setAttribute method of an XMLDOMElement.
Jan Hoek
Product Developer
Mprise Products B.V.
But I've got 2 problems left:
1. I get an error when i try to use the function "insert before", because it isn't allowed to insert a processing instruction before the first node.
2. when i read xml-files the import will break, when the file contents special signs like @, &... how can i improt files with these signs?
greetings, rallnus
Perhaps you should append the processing instruction before you do anything else. I used this technique several times and the past, and never experienced any problems. Post a snippet of your code to this forum if your problem persists.
Ad 2.
I think you should escape these special characters as follows:
& must be replaced with &
< must be replaced with <
> must be replaced with >
' must be replaced with '
" must be replaced with "
(the trailing semicolon is part of the entity)
Jan Hoek
Product Developer
Mprise Products B.V.
Perhaps you should append the processing instruction before you do anything else. I used this technique several times and the past, and never experienced any problems. Post a snippet of your code to this forum if your problem persists.
Ad 2.
I think you should escape these special characters as follows:
& must be replaced with &
< must be replaced with <
> must be replaced with >
' must be replaced with '
" must be replaced with "
(the trailing semicolon is part of the entity)
Jan Hoek
Product Developer
Mprise Products B.V.