viernes, 26 de julio de 2013

XML - Editor, Tools,...


XML editing software
Java is not compatible with UTF8 with BOM and XOG is based in Java
so use UTF8 (withoutBOM) or cp1252 aka ANSI

--Ms.Notepad XML 2007
(be careful writes UTF8 with BOM)
   Outline view with XML elements. Able to drag and drop elements from one file to other

--XML Spear 3.1. Good free software! it is possible to select the enconding(even UTF8 with BOM)
   Outline with element, no drag and drop
   Able to open big files (>20MB)  
   Plugin for Clarity

--Eclipse Indigo+WTP
   By default not able to manage big xml files
  Outline view with XML elements, Able to drag and drop elements from one file to other (in different Eclipse windows)

 Eclipse XML Editors and Tools
  org.eclipse.wst.xml_ui.feature
  org.eclipse.wst.xsl.feature

--Notepad++
  it is not an specific editor but it has colour syntax and can be used to compare two files (plugin compare)

--PSPad
  it is not an specific editor but it has colour syntax and can be used to compare two files(Tools, text Differences)


Web services
Create XSD from web:
http://www.xmlforasp.net/CodeBank/System_Xml_Schema/BuildSchema/BuildXMLSchema.aspx
XSD in Russian Doll Style or Separate Complex Types

!note.  resulting XSD is not proper to map Clarity instances, value is missing.

Flame-Ware Solutions XML-2-XSD v2.0
http://www.flame-ware.com/Products/XML-2-XSD/
!note. resulting XSD has xmlns:msdata, not proper to map Clarity

jueves, 11 de julio de 2013

XML- Map data to XML for XOG

XOG-in CSV data to a Clarity custom object

Using Mapforce2013 *
*Mapforce2013Enterprise (rel2sp2) [commercial app]
With installation folder it can be used as a portable app.
Registration is computer dependent (C:\ProgramData\Altova\MapForce2013)


In order to generate a xml to xog-in

  • Add schema file(xsd)
    •   ../xsd/nikuxog_customObjectInstance.xsd
  • Add csv or xslx (xslx better to display column headers)
    •  Config. rows level, "Show separate items for columns"

  • Config at XSD
    •  Attributes content is inside tag ColumnValue
    • Add a duplicate of ColumnValue per each attribute to map
    • map attribute name to "name" element in Schema
    • map content to "text()" element in Schema
  • Map columns and constants to Schema
    •  map Row number to xsd element with iteration (sequence)
    •  map columns to xsd elements






Mapforce mapping
  

  • Menu: Output, Save Output file, (xml file to xog-in)
  • Edit in xml file to correct local paths, i.e.  xsi:noNamespaceSchemaLocation="../../xsd/nikuxog_customObjectInstance.xsd"
Notes
*Clarity date attribute is in format yyyy-mm-ddT00:00:00 and will be xogout including time but format yyyy-mm-dd is supported for xogin