Reputation: 2030
I have this part of an XML (which I got from an external source)
> <ListOfStructuredNote>
> <StructuredNote>
> <GeneralNote>Part APart B</GeneralNote>
> <NoteID>Info record PO text</NoteID>
> <Agency>
> <AgencyCoded>Other</AgencyCoded>
> <AgencyCodedOther>asdasd</AgencyCodedOther>
> </Agency>
> </StructuredNote>
> </ListOfStructuredNote>
The (complete) XML will be parsed with Lotusscript. The function: CreateDOMParser
will be used to parse the XML.
Eventually I need the value of the GeneralNote element which is Inside the element: ListOfStructure. With the following code I can retrieve the value of GeneralNote and put it into a variable called : note which is of type String. The code in Lotusscript:
ret = getFieldValue(Node, "ListOfStructuredNote", "String")
note = ""
If Not ChildNode Is Nothing Then
numChildren = ChildNode.NumberOfChildNodes
Set child = ChildNode.FirstChild ' Get child
While numChildren > 0
If Child.NodeType = 1 Then
If Not Child.FirstChild.FirstChild.isNull Then
note = note + Child.FirstChild.FirstChild.NodeValue
End If
End If
Set child = child.NextSibling ' Get next child
numChildren = numChildren - 1
Wend
End If
When the variable note is saved into a Lotus Document field (type text list) then I see this as output: Part A(newline) Part B
How is it possible that there is a newline. Because if I open the XML in a text editor like vscode or sublime text 3, then I do not see any newline. So what I am asking is: How can I detect any formatting?
Upvotes: 0
Views: 54
Reputation: 14628
Try a different text editor with a feature that shows hidden characters.
For example, use Notepad++ and select View - Show Symbol - Show All Characters. You'll probably find that there really is something there between Part A and Part B.
Upvotes: 1