Home
Extended ECM
API, SDK, REST and Web Services
XML - How to manage XML file with livelink ?
Application_Services_FUJITSU_(fuji_ware03_-_(delet
Hello,I would like to open an XML file, managed it (remove a node) and save the result as a new file.As I'm working with Livelink 9.1 I'm searching for an Oscript sample.I know that it exists XMLWriter object but I don't find any documentation about this objectThank for your help,Jean-Fran?ois
Find more posts tagged with
Comments
Donna Nalls
Hello Jean-FrancoisThere is a guide for xml export/import in the following folder (livelink 9.1):
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=2672576&objAction=browsecaveat
emptor - the xml object model changes completely in Livelink 9.5 and upgrading any custom xml code is not always pretty -- be prepared for that! Here is the folder that contains the xml export/import guide for LL 9.5:
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=3941109&objAction=browse
Application_Services_FUJITSU_(fuji_ware03_-_(delet
Hello Thank you for your responseBut there is nothing in this document to manage XML FileMy problem is to modify the result of an export XML and save the new result.No problem to modify but I don't know how to save the result.... Assoc l_Status, l_Result String l_XmlIn = 'C:\myTempFile.xml' String l_XmlOut = 'C:\out.xml' DOMParser l_XmlParser DOMDocument l_XmlDocument l_Status.ok = TRUE l_Status.errMsg = "" // *** Get the Input XML file *** l_XmlParser = DOMParser.New() l_Result = l_XmlParser.Parse(l_XmlIn ) if ( !l_Result.ok ) l_Status.ok = FALSE l_Status.errMsg = Str.Format( "Error parsing XML document '%1': %2", l_XmlIn, l_Result.errors[1].errMsg ) goto ErrHand end l_XmlDocument = l_XmlParser.GetDocument() ... Here modify the XMLDocument ... Now How to save the XMLDocument on the file system ?
Donna Nalls
Hi Jean-Francois,I am a little confused -- are you going to invoke a Livelink XML Export and modify the output or do you have an existing XML document that you want to import, parse and save as a new xml document?In LL 9.1, if you look at LLIAPI-->XML, you will find most (if not all) of the XML objects needed for xml manipulation, including the three xmlwriter objects - if you are doing a low-level write after you parse and modify the xml, then you would set .fOutput feature of your xmlWriter object to be the file server document path. donna
Donna Nalls
have a look at LLIAPI-->XMLExport.Export -- this is the ll xmlexport and will give you a good understanding of how to instantiate a new writer object and write contents.good luck