Skip to content

Commit

Permalink
Merge branch 'x2js' of github.com:johngeorgewright/angular-xml into x2js
Browse files Browse the repository at this point in the history
  • Loading branch information
johngeorgewright committed Dec 19, 2014
2 parents 89b637a + 8952171 commit 244e521
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ angular
.config(function (x2jsProvider) {
x2jsProvider.config = {
/*
escapeMode : true|false - Escaping XML characters. Default is true from v1.1.0+
attributePrefix : "<string>" - Prefix for XML attributes in JSon model. Default is "_"
arrayAccessForm : "none"|"property" - The array access form (none|property). Use this property if you want X2JS generates an additional property <element>_asArray to access in array form for any XML element. Default is none from v1.1.0+
emptyNodeForm : "text"|"object" - Handling empty nodes (text|object) mode. When X2JS found empty node like <test></test> it will be transformed to test : '' for 'text' mode, or to Object for 'object' mode. Default is 'text'
enableToStringFunc : true|false - Enable/disable an auxiliary function in generated JSON objects to print text nodes with text/cdata. Default is true
arrayAccessFormPaths : [] - Array access paths. Use this option to configure paths to XML elements always in "array form". You can configure beforehand paths to all your array elements based on XSD or your knowledge. Every path could be a simple string (like 'parent.child1.child2'), a regex (like /.*\.child2/), or a custom function. Default is empty
escapeMode : true|false - Escaping XML characters. Default is true from v1.1.0+
attributePrefix : "<string>" - Prefix for XML attributes in JSon model. Default is "_"
arrayAccessForm : "none"|"property" - The array access form (none|property). Use this property if you want X2JS generates an additional property <element>_asArray to access in array form for any XML element. Default is none from v1.1.0+
emptyNodeForm : "text"|"object" - Handling empty nodes (text|object) mode. When X2JS found empty node like <test></test> it will be transformed to test : '' for 'text' mode, or to Object for 'object' mode. Default is 'text'
enableToStringFunc : true|false - Enable/disable an auxiliary function in generated JSON objects to print text nodes with text/cdata. Default is true
arrayAccessFormPaths : [] - Array access paths. Use this option to configure paths to XML elements always in "array form". You can configure beforehand paths to all your array elements based on XSD or your knowledge. Every path could be a simple string (like 'parent.child1.child2'), a regex (like /.*\.child2/), or a custom function. Default is empty
skipEmptyTextNodesForObj : true|false - Skip empty text tags for nodes with children. Default is true.
stripWhitespaces : true|false - Strip whitespaces (trimming text nodes). Default is true.
datetimeAccessFormPaths : [] - Datetime access paths. Use this option to configure paths to XML elements for "datetime form". You can configure beforehand paths to all your array elements based on XSD or your knowledge. Every path could be a simple string (like 'parent.child1.child2'), a regex (like /.*\.child2/), or a custom function. Default is empty
stripWhitespaces : true|false - Strip whitespaces (trimming text nodes). Default is true.
datetimeAccessFormPaths : [] - Datetime access paths. Use this option to configure paths to XML elements for "datetime form". You can configure beforehand paths to all your array elements based on XSD or your knowledge. Every path could be a simple string (like 'parent.child1.child2'), a regex (like /.*\.child2/), or a custom function. Default is empty
*/
};
});
Expand Down Expand Up @@ -108,7 +108,9 @@ angular
Installation
------------

There are 3 optoins:
First aquire the [X2JS][] library (this comes bundled with the bower option described next)

Then there are 3 optoins:

1. Download the latest tag.
2. Use bower: `bower i --save angular-xml`
Expand Down

0 comments on commit 244e521

Please sign in to comment.