Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
DOMNode.AppendChild()
Francisco_Alcala-Soler_(iaea_001user3_-_(deleted))
Message from via eLinkHi,We are trying to use the method AppendChild() on DOMNodes in the XMLpackage. We are successful in using it on "manually" created elements: DOMDocument xmlDocument = DOMDocument.New() DOMElement xmlElement = xmlDocument.CreateElement( "aaa" ) xmlElement.SetAttribute( "version", "1.0" ) DOMNode cloneNode = xmlElement.CloneNode( TRUE ) DOMNode xmlNode = xmlDocument.AppendChild( cloneNode )This way we can create DOM documents at will. However, when we parse anotherdocument and obtain one of its nodes and try to append it to the xmlNodecreated in the previous example, it doesn't work. Here is a sample of thecode we are trying to use: // Same as above. DOMDocument xmlDocument = DOMDocument.New() DOMElement xmlElement = xmlDocument.CreateElement( "aaa" ) xmlElement.SetAttribute( "version", "1.0" ) DOMNode cloneNode = xmlElement.CloneNode( TRUE ) DOMNode xmlNode = xmlDocument.AppendChild( cloneNode ) // New code. DOMParser xmlParser = DOMParser.New() DOMDocument xmlInputDoc = DOMDocument.New() Assoc result = Assoc.CreateAssoc() result = xmlParser.Parse( "C:\document.xml") xmlInputDoc = xmlParser.GetDocument() DOMList xmlList = xmlInputDoc.GetElementsByTagName( "bbb" ) DOMNode xmlTempNode = xmlList.Item( 0 ) DOMNode xmlLastNode = xmlNode.AppendChild( xmlTempNode )Stepping through the code, xmlLastNode takes always an error value of thetype E9999999999. We have tried to CloneNode() and Cast() the xmlTempNode indifferent ways, but we can't get it to work. Can anybody help us with thisissue?Thanks a lot, CurroThis email message is intended only for the use of the named recipient.Information contained in this email message and its attachments may beprivileged, confidential and protected from disclosure. If you are not theintended recipient, please do not read, copy, use or disclose thiscommunication to others. Also please notify the sender by replying to thismessage and then delete it from your system.
Find more posts tagged with
Comments
There are no comments yet