Forum > LazUtils

Question about TDOMNode NodeName

<< < (2/2)


--- Quote from: stab on January 19, 2021, 11:57:04 pm ---you can see "<text:s/>

--- End quote ---

 :o :'(

Looks like space character node ( What happens when you replace it by a usual space character in the xml and repack to odt?


--- Quote from: stab on January 19, 2021, 05:00:51 pm ---Is there some restriction regarding TDOMNode NodeName?
It is OK to create a node with NodeName: "text:s",
but I would need NodeName: "text:s/" and tried following:
  textSNode := currentDoc.CreateElement('text:s/'); and got error message:
EDOMError.Create(INVALID_CHARACTER_ERR, 'DOMDocument.CreateElement');

How should I do to create a node like this? %)

--- End quote ---

<text:s/> is just an EMPTY elment with the name "text:s". Create the empty namespaced element and add it to the correct parent .

Thanks to you all,

dsiders; I had tried to make an empty element with the name "text:s", but must have done
some mistake in the code. Now it works :D


[0] Message Index

[*] Previous page

Go to full version