There may be a need to export content from database and import it.
To export an image, assuming you know the image id, and that the ExportPics.xml stylesheet is in the specified folder, use the following command: c:\tera\gn4\bin\srv4 export -ids <imageid> -opt c:\tera\gn4\ExportPics.xml -out c:\tera\gn4\export\exportedimage.xml The command will generate more files in the target folder c:\tera\gn4\export. It is a good idea to empty the folder before exporting. To import exported image, use: c:\tera\gn4\bin\srv4 import -in c:\tera\gn4\export\exportedimage.xml ExportPics.xml It is an auxiliary file. <?xml version="1.0" encoding="utf-8"?> <!-- Sample export options file - to be used in the 'cmd4 export' and 'srv4 export' commands, '-opt' parameter --> <XmlExportOptions xmlns="http://www.teradp.com/schemas/GN4/1/XmlExportOptions.xsd" Encoding="UTF-8" Indent="TwoSpaces" NewLine="CRLF" OmitXmlDeclaration="false" DataAsId="false" DataFiles="true" DataMaxSize="0" AccessStrict="false" OutputNulls="false" RefKeys="true"> <Xslt> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:nav="http://www.teradp.com/schemas/GN4/1/ObjNav.xsd" xmlns:t="http://www.teradp.com/schemas/GN3/t.xsd" xmlns:fn="http://www.teradp.com/schemas/GN4/1/Xslt" xmlns:edfn="http://www.teradp.com/schemas/GN4/1/EditorialXslt" xmlns:lc="http://www.teradp.com/schemas/GN4/1/LoginContext.xsd" xmlns:gn4="urn:schemas-teradp-com:gn4tera" xmlns:tera="urn:tera-functions" exclude-result-prefixes="nav gn4 fn lc t edfn tera xsd xsi"> <xsl:output method="xml" indent="yes"/> <xsl:template match="@*|node()"> <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy> </xsl:template> <xsl:template match="@id|pageLayers|gn4:pageLayers|linked|gn4:linked"/><!-- remove Id --> </xsl:stylesheet> </Xslt> <Pars> <!-- <exportSettings xmlns=""> <add key="doCopyflow"/> </exportSettings> --> </Pars> </XmlExportOptions>
|
You may need to get an object XML from database to review it's attributes. For example, you may want to know which is the size of image previews. To get an image XML from database, first locate the id of the image. You can get it on the Properties form, or hovering over image icon in the listing. Let's assume the id of the image is 123317. Now, run the browser and login to GN4. Paste the following in the address bar: http://main.teradp.com/GN4/do.ashx?cmd=objs&ids=123317 This will display the XML of the image. It may be quite long and its format depends on the plug-ins of your browser. On the following screen shot, the XML is displayed in the Chrome browser, and <pageLayers...> section is collapsed: Now, identify the <preview node, and the id of the preview file. It has a format of id="data234534". Copy just the numeric part, e.g. 234534, and then paste it in the address bar as: http://main.teradp.com/GN4/do.ashx?Cmd=Data&DataId=234534 This will download to your local drive the picture file. Right-click it in the File Explorer, and then on the Details tab, look at its size in pixels. See also |
See also