我有遗产五B 6号申请,用于维护这些物品。
它使用载荷XML MSXML2.DOMDocument用于从Xml strings中产生,然后使用xml 锡姆尔矿区:
Dim doc As MSXML2.DOMDocument
Set doc = CreateObject("MSXML2.DOMDocument.4.0")
Call doc.loadXML("<doc/>")
... manipulation of doc ...
Dim xml As String
xml = doc.xml
我发现了一个与xml财产有关的问题。 在使用上述法典时,护卫Xml在最后拥有新列车:
How can I stop this from happening?
如果能够阻止这种做法(即如果它在MSXML中 s,或者通过设计),那么我如何能够在VB 6中去除。 <>trim(xml)n t work>
EDIT I have updated the question as it it the .xml Property not the .loadXML Method which appears to be at fault. If I select the doc as an Element:
Dim elm As MSXML2.IXMLDOMElement
Set elm = doc.selectSingleNode("doc")
xml = elm.xml
之后是.xml 财产按预期具有无附加特性,因此看来属于DOMDocument.xml财产。
EDIT 2: Following SpectralGhost s answer, here is what I ended up using:
If Right(xml, Len(vbNewLine)) = vbNewLine Then
xml = Left(xml, Len(xml) - Len(vbNewLine))
End If
我使用“新Line”来避免平台上的具体问题。