[GB.XML]
* BUG: XmlWriter: The Element() shortcut method now correctly escapes text content. git-svn-id: svn://localhost/gambas/trunk@8120 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
c6102c762f
commit
033a769095
2 changed files with 3 additions and 3 deletions
|
@ -5,7 +5,7 @@ Public Sub Main()
|
|||
Dim writer As New XmlWriter
|
||||
|
||||
|
||||
writer.Open("text.xml", True)
|
||||
writer.Open(Null, True)
|
||||
writer.StartElement("toto")
|
||||
writer.StartElement("titi")
|
||||
writer.Attribute("titi", "tutu\ntoto")
|
||||
|
@ -14,7 +14,7 @@ writer.EndElement()
|
|||
writer.StartElement("titi")
|
||||
writer.Text("hello")
|
||||
writer.EndElement()
|
||||
writer.Element("toto", "hello", "np", "http://np.org")
|
||||
writer.Element("toto", "hel<<lo", "np", "http://np.org")
|
||||
writer.StartElement("foo", ["fizz", "buzz"], "tx", "http://example.com/tx.xml")
|
||||
writer.StartElement("titi")
|
||||
writer.Text("hello")
|
||||
|
|
|
@ -49,7 +49,7 @@ Public Sub Element(TagName As String, Optional Value As String, Optional Prefix
|
|||
If URI Then PrintXmlNsAttribute(Prefix, URI)
|
||||
|
||||
If Value Then
|
||||
Print #$stream, ">"; Value; "</"; TagName; "> ";
|
||||
Print #$stream, ">"; XmlNode.Serialize(Value); "</"; TagName; "> ";
|
||||
Else
|
||||
Print #$stream, " />";
|
||||
Endif
|
||||
|
|
Loading…
Reference in a new issue