pyx12.nodeCounter

Loop and segment counter

Classes

NodeCounter

X12 Loop and Segment Node Counter

Module Contents

class pyx12.nodeCounter.NodeCounter(initialCounts=None)[source]

X12 Loop and Segment Node Counter

Parameters:

initialCounts (collections.abc.Mapping[str | pyx12.path.X12Path, int] | None)

reset_to_node(xpath)[source]

Pop to node, deleting all child counts Keep count of xpath node

Parameters:

xpath (str | pyx12.path.X12Path)

Return type:

None

increment(xpath)[source]

Increment path count

Parameters:

xpath (str | pyx12.path.X12Path)

Return type:

None

setCount(xpath, ct)[source]

Set path count

Parameters:
Return type:

None

get_count(xpath)[source]

Get path count

Parameters:

xpath (str | pyx12.path.X12Path)

Return type:

int

getState()[source]
Return type:

collections.OrderedDict[pyx12.path.X12Path, int]

static makeX12Path(xpath)[source]
Parameters:

xpath (str | pyx12.path.X12Path)

Return type:

pyx12.path.X12Path